解決済み


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 =...

9年以上 前

解決済み


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

9年以上 前

解決済み


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

9年以上 前

解決済み


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...

9年以上 前

解決済み


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 ...

9年以上 前

解決済み


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

9年以上 前

解決済み


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...

9年以上 前

解決済み


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...

9年以上 前

解決済み


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...

9年以上 前

解決済み


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

9年以上 前

解決済み


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...

9年以上 前

解決済み


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

9年以上 前

解決済み


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

9年以上 前

解決済み


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

9年以上 前

解決済み


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,...

9年以上 前

解決済み


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)

9年以上 前

解決済み


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...

9年以上 前

解決済み


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....

9年以上 前

解決済み


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...

9年以上 前

解決済み


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...

9年以上 前

解決済み


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...

9年以上 前

解決済み


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...

9年以上 前

解決済み


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

9年以上 前

解決済み


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...

9年以上 前

解決済み


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 ...

9年以上 前

解決済み


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...

9年以上 前

解決済み


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

9年以上 前

解決済み


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...

9年以上 前

解決済み


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

9年以上 前

解決済み


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

9年以上 前

さらに読み込む