Solved

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]

9 months ago

Solved

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

9 months ago

Solved

Calculate Inner Product

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

9 months ago

Question

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

9 months ago | 0 answers | 0

Solved

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

9 months ago

Solved

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

9 months ago

Solved

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

9 months ago

Solved

Whether the input is vector?

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

9 months ago

Solved

Get the length of a given vector

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

9 months ago

Question

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

10 months ago | 1 answer | 0

Question

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

10 months ago | 0 answers | 0

Question

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

10 months ago | 2 answers | 0

Solved

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

10 months ago

Solved

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

11 months ago

Solved

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

11 months ago

Solved

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

11 months ago

Solved

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

11 months ago

Solved

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.

11 months ago

Question

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

1 year ago | 2 answers | 0

Solved

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

1 year ago

Solved

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

1 year ago

Solved

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

1 year ago

Question

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

1 year ago | 1 answer | 0

Question

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

1 year ago | 1 answer | 0

Question

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

1 year ago | 1 answer | 0

Question

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

1 year ago | 0 answers | 0

Question

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

1 year ago | 1 answer | 0

Question

What does cpselect do? and what are the potential applications and uses of it? (Any examples please)

I came across the function (cpselect) and i didn't exactly what the use of it. I select some points in the two images. And I wan...

1 year ago | 0 answers | 0