문제를 풀었습니다


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년 초과 전

더 보기