Replacing elements of an array with a vector
Hi Greggory, According to the solution you show, you can get it by doing: a(:, a(1,:)==1) = [a; b ] Best regards, Jesús

11 months ago | 0

Problem

Alternating 1´s and 0´s in a matrix
Given an odd number n, write a function that creates a matrix y with dimension nxn alternating 1's and 0's, and starting with 1 ...

11 months ago | 0

Solved

Rotate a matrix for 180 degree
Rotate a matrix for 180 degree for eg: x=[1 2 3 4] y=[4 3 2 1]

12 months ago

Solved

Rotate matrix by -90 degrees
Rotate a Matrix by -90 degrees Example: X = 1 2 3 4 5 6 7 8 9 output = 7 4 ...

12 months ago

Solved

Create vector as shown in test cases
Create vector as shown in test cases

12 months ago

Solved

Basic commands - rounding
make a function which will round to integer, which is nearer to zero. Example x=[-2.5 2]; y=[-2 2];

12 months ago

Solved

Vector Multiplication
Vector Multiplication of three matrix as shown in test cases.

12 months ago

Solved

Area of a disk
Find the area of a disk or circle. x= radius of the disk.

12 months ago

Solved

DC chopper
Input x is the sampled signal vector, may have both AC and DC components. output vector y should have AC components removed then...

12 months ago

Solved

factorial of a number x
Factorial of a number x

12 months ago

Solved

Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

12 months ago

Solved

BASICS - sum part of vector
Please make a function, where as input you get vector "x" and and vector "c", where in "c" vector you get indexes to sum. Examp...

12 months ago

Solved

first element of matrix
find the first elements of a column matrix

12 months ago

Solved

Binary
Given a positive, integer n, create a function that returns the respective binary number in the form of a vector. Example: ...

12 months ago

Solved

Average of square wave
given positive and negative peak , calculate dc level, 50% duty cycle

12 months ago

Solved

Say type of roots in quadratic equation
Given the coefficients of a quadratic equation, write a function that gives the output y='RealDifferent' if the roots are real a...

12 months ago

Problem

Approximate the inverse tangent by power series
Given values b (where abs(b)<=1) and n (polynomial order), write a function that calculates atan(b) by using power series.

12 months ago | 0

Solved

Calculate the roots of a quadratic equation, given coefficients a, b, and c, for the equation a*x^2 + b*x + c = 0.

12 months ago

Problem

Say type of roots in quadratic equation
Given the coefficients of a quadratic equation, write a function that gives the output y='RealDifferent' if the roots are real a...

12 months ago | 0

Solved

Summation of array
Given an array, Find the sum of all of the elements in it Examples: Input x = [1 2 3 5; 4 5 6 7]; Output y is 33

12 months ago

Solved

If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...

12 months ago

Solved

Find the product of a Vector
How would you find the product of the vector [1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0] times 2?; x = [1 : 0.5 : 6]; y ...

12 months ago

Solved

Matlab Basics II - Count rows in a matrix
Write a function that returns that number of rows in a vector or matrix x example: x = [1; 2; 3] output = 3

12 months ago

Solved

Find the maximum number of decimal places in a set of numbers
Given a vector or matrix of values, calculate the maximum number of decimal places within the input. Trailing zeros do not coun...

12 months ago

Solved

Make roundn function
Make roundn function using round. x=0.55555 y=function(x,1) y=1 y=function(x,2) y=0.6 y=function(x,3) ...

12 months ago

Solved

Matlab Basics - Rounding III
Write a script to round a large number to the nearest 10,000 e.g. x = 12,358,466,243 --> y = 12,358,470,000

12 months ago

Solved

Rounding off numbers to n decimals
Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...

12 months ago

Solved

Check that number is whole number
Check that number is whole number Say x=15, then answer is 1. x=15.2 , then answer is 0. <http://en.wikipedia.org/wiki/Whole...

12 months ago

Solved

MATLAB Basic: rounding IV