문제를 풀었습니다


Check if number exists in vector
Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

대략 4년 전

문제를 풀었습니다


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

대략 4년 전

문제를 풀었습니다


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

대략 4년 전

문제를 풀었습니다


Calculate Inner Product
Given two input matrices, |x| and |y|, check if their inner dimensions match. * If they match, create an output variable |z|...

대략 4년 전

질문


How to simulate an irradiance of beamlets recombination after emerging from a square aperture, in MATLAB?
I want to simulate (in 3D) the irradiance of several beamlets recombined together after emerging from a square aperture, knowing...

대략 4년 전 | 답변 수: 0 | 0

0

답변

문제를 풀었습니다


Find the Oldest Person in a Room
Given two input vectors: * |name| - user last names * |age| - corresponding age of the person Return the name of the ol...

4년 초과 전

문제를 풀었습니다


Calculate Amount of Cake Frosting
Given two input variables |r| and |h|, which stand for the radius and height of a cake, calculate the surface area of the cake y...

4년 초과 전

문제를 풀었습니다


Convert from Fahrenheit to Celsius
Given an input vector |F| containing temperature values in Fahrenheit, return an output vector |C| that contains the values in C...

4년 초과 전

문제를 풀었습니다


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

4년 초과 전

문제를 풀었습니다


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

4년 초과 전

질문


How to find the exact index(row, col) of a maximum value in a matrix?
I want to find the maximum value in an image, I tried to find its index and I found it after converting the image matrix into a ...

4년 초과 전 | 답변 수: 1 | 0

1

답변

질문


Cody gives me error for my solution whereas MATLAB run it efficiently
I tried to solve some problem in Cody. I wrote that function and run it in MATLAB and it worked perfectly. While it gives me err...

4년 초과 전 | 답변 수: 0 | 0

0

답변

질문


How can I use some downloaded function?
I downloaded some functions files with a script file from Mathworks website. Every time I run this script, it tells me that thes...

4년 초과 전 | 답변 수: 2 | 0

2

답변

문제를 풀었습니다


Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

4년 초과 전

문제를 풀었습니다


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

4년 초과 전

문제를 풀었습니다


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; ...

4년 초과 전

문제를 풀었습니다


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

4년 초과 전

문제를 풀었습니다


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

4년 초과 전

문제를 풀었습니다


Return area of square
Side of square=input=a Area=output=b

4년 초과 전

문제를 풀었습니다


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

4년 초과 전

문제를 풀었습니다


Add two numbers
Given a and b, return the sum a+b in c.

4년 초과 전

질문


Why do we transfer the image into double?
I saw a lot of image processing examples and before conducting any analysis the image is transfered into double. Is it essential...

4년 초과 전 | 답변 수: 2 | 0

2

답변

문제를 풀었습니다


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

거의 5년 전

문제를 풀었습니다


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

거의 5년 전

문제를 풀었습니다


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

거의 5년 전

질문


Why sometimes we place an empty brackets inside function inputs?
I don't know the purpose or the mean of these empty square brakets inside many functions, for instance: min( a, [ ],2) imsho...

거의 5년 전 | 답변 수: 1 | 0

1

답변

질문


How can I update the x axis limit inside a loop?
% parameters omav = 5*1000*2*pi; % omega average, center sigma = [0,0.5,1,2,5].*1000*2*pi; % std deviation. A.K.A width t...

거의 5년 전 | 답변 수: 1 | 0

1

답변

질문


How to make a loop to do a specific operation for multiple variables?
lambda = num(:,1); RefInd1 = num(:,2); RefInd2 = num(:,3); RefInd3 = num(:,4); % For the draw ratio DR=1.00 ny1 = int...

거의 5년 전 | 답변 수: 1 | 0

1

답변

질문


Why polar plot is not circular like this?
I tried to plot data by polarplot function and it keeps looking like this.. However, when I plot these data in some other progr...

거의 5년 전 | 답변 수: 0 | 0

0

답변

질문


How can I automate Matlab to measure specific regions in an image?
I want to make Matlab to measure these distances (red lines) automatically for every image I insert it. These measured distances...

거의 5년 전 | 답변 수: 1 | 0

1

답변

더 보기