MATLAB Solutions & Expert Answers

Ask an expert. Trust the answer.
Academic and engineering questions answered by verified MATLAB professionals.

MATLAB expert answering student questions
Showing page 179 of 208 Ask a Question
How to select non-sequential values in an array?
Quincy · Nov 4, 2020 · matlab , matrix , array,

I am trying to select the first, fifth, and ninth values of a 12x1 matrix. I am aware of how to reference sequential values like a(1:5,1) for the first five values but cannot figur…

How to form an array with the input values?
Alfredo · Nov 4, 2020 · matlab , matrix , array,

%How would i form an array if i had 5 inputs like this of random number % displayed at the end. clc,clear x = 12; num = 0; for index = 1:5 y = input('Guess the number? ','s'); z = …

how to call out specific cell in a matrix
Nicholassmith · Nov 4, 2020 · matlab , matrix , simulink

If I have A=[1,2,3,4,5] B=[6,7,8,9,10] C=[1,2,3,4,5] If there a way to call out specific position at each matrix so that: Sum first value of A and first value of B (1+6) Compare it…

Merging two arrays based on index arrays
Mauricio · Nov 4, 2020 · matlab , array index , matrix

I have the  arrays z_index = [2 3] and y_index = [4 1 5]. They store the indices of a main array x. z(z_index) = [1 3] and y(y_index) = [-2 4 2]. How do I code to find the array x…

Getting Index in position 1 exceeds arrray bound error
Isaiah · Nov 3, 2020 · matlab , image processing, array , matlab code

I wrote a MATLAB code which will put a black box of 10 pixels width at the center of image but I am getting error which says "Index in position 1 exceeds array bounds error" Here i…

Plotting histogram of image data present in a stack
Jaxon · Nov 3, 2020 · matlab , image processing, plotting , histogram , rgb

how to plot histogram of a single image data. But it's not clear to me how the data in a stack can be plotted. For exmaple,    f = "Test_Image.tiff"; img_data = imfinfo(f); imhis…

Color map from green to red
Audrey · Nov 3, 2020 · matlab , image processing, color map

I have a map with values and i would like to display the values with colors - from green to red. The value closest to 0 will be green and the farthest will be red.     Example: 1…

how to find euclidean distance for an image?
Savannah · Nov 3, 2020 · matlab , image processing, euclidean distance

I have 100 images and i have to find the euclidean distance for it,and i have to take a query image and find the euclidean distance and retrieve the image ,i have extracted an feat…

Get a Free Consultation or a Sample Assignment Review!