Gelöst


De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

mehr als 9 Jahre vor

Gelöst


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

mehr als 9 Jahre vor

Gelöst


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

mehr als 9 Jahre vor

Gelöst


Balanced number
Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

mehr als 9 Jahre vor

Gelöst


Replace NaNs with the number that appears to its left in the row.
Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

mehr als 9 Jahre vor

Gelöst


Quote Doubler
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...

mehr als 9 Jahre vor

Gelöst


Is my wife right? Now with even more wrong husband
Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...

mehr als 9 Jahre vor

Gelöst


How to permute given 3d matrix?
A(:,:,1)=[1 3] A(:,:,2)=[2 2] A(:,:,3)=[4 3] Change rows to columns and columns to rows, similar to transpose. Resul...

mehr als 9 Jahre vor

Gelöst


Two dimensional moving average
A=[1 2 3 4 5 1 2 2 2 3 2 3 3 3 4 1 1 4 4 2] B=[1 1;1 1]; % This is can be used for weight factor of moving a...

mehr als 9 Jahre vor

Gelöst


Calculate this one!
Using matlab calculate y y=(e^2)+100/20+sin(pi)*x Use x as a input.

mehr als 9 Jahre vor

Gelöst


Calculate gradient
x=1:0.1:5; y=@(x)x^2; calculate gradient (dy/dx) using numerical method. This means dydx(i)=(y(i+1)-y(i))/(x(i+1)-x...

mehr als 9 Jahre vor

Gelöst


Half wave rectifier
Create a function that emulates a half wave rectifier. Use a sine wave

mehr als 9 Jahre vor

Gelöst


Get 1-4-3-4-4
Get the value of the indices in the title and assign it to an array

mehr als 9 Jahre vor

Gelöst


Full Wave rectifier
Create a function that emulates a full wave rectifier. Use a sine wave

mehr als 9 Jahre vor

Gelöst


Determine point is located in a circle or not
Using input [x] and [y], determine the points (x,y) is located inside of circle (x^2+y^2=1) if point is located in circle,...

mehr als 9 Jahre vor

Gelöst


Calculate numerical integration.
x=0:0.01:1 y=@(x)x.^2 Using given two inputs(x and y), conduct numerical integration in x. (hint: trapz)

mehr als 9 Jahre vor

Gelöst


N-plicate me
Modified version of duplicate and triplicate me. Repeat elements of input vector with given input n Ex: input = [1 2 3 4 5...

mehr als 9 Jahre vor

Gelöst


Calculate representive values (max. min. std)
A B C -------------------------- t=1 2.2 2.6 2.4 t=2 2.4 2.8 2.2 t=3 2.6 2.7 2....

mehr als 9 Jahre vor

Gelöst


Extract area
There are observed data c and its location (x,y) x=1:0.1:10 y=1:0.1:10 % x and y are used as inputs [X,Y]=mesh...

mehr als 9 Jahre vor

Gelöst


Can we make a triangle?
Given three positive number, check whether a triangle can be made with these sides length or not. remember that in a triangle su...

mehr als 9 Jahre vor

Gelöst


Calculate 3D Distance
Given 2 vectors (1st is initial position, 2nd is the destination) calculate the distance in 3D Example in1 = [0 0 0] in2...

mehr als 9 Jahre vor

Gelöst


Refresh your system of equations
Given square matrix, and solution vector, find the values of the variables Example: xyz = [1 -1 2; 0 2 5; 4 0 -3]; //x-y+2...

mehr als 9 Jahre vor

Gelöst


Calculate circle's property
[A R]=function(r) r is radius, A is area of circles, R is circumference. A=pi*r^2 R=2*pi*r

mehr als 9 Jahre vor

Gelöst


Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

mehr als 9 Jahre vor

Gelöst


Calculate inverse matrix in square matrix
A=eye(3) Calculate inverse matrix of given input. B=function(A) ans = 1 0 0 0 1 0 ...

mehr als 9 Jahre vor

Gelöst


Calculate inverse matrix in m by n matrix
x=(1:10)' y=roundn(2*x+7*rand(size(x)),-1) a*x=y Estimate a using inverse matrix calculation. This is principle of li...

mehr als 9 Jahre vor

Gelöst


Vectors multiplication.
Multiply two vectors x transposed and y.Example x = [1 2 3 4 5 6 7 8 9 10 ] y = [ 1 2 ...

mehr als 9 Jahre vor

Gelöst


Pointwise multiplication of vectors.
Pointwise multiplication of vectors x and y. Example x= [1 3 5 7 9 11 13 15 17 19] y=[ 1 4...

mehr als 9 Jahre vor

Gelöst


Sum positive elements of matrix.
Calculate sum of positive elements of the matrix.

mehr als 9 Jahre vor

Gelöst


Set x value to each even index of vector y.
Set x value to each even index of vector y.

mehr als 9 Jahre vor

Mehr laden