Answered
sum all successive values in matrix row
summiya - for the seventh element, you seem to have (10+10*(0.3+0.1+0.2) Is the 0.3 a mistake and so should be 0.1 inste...

8 years ago | 1

Answered
Find the mean of every 5 values in an array
Lanceric - try using <https://www.mathworks.com/help/matlab/ref/reshape.html reshape> to change your array from a 1x20 to a 5x4 ...

8 years ago | 0

| accepted

Answered
How can I plot multiple discontinuous segments in different colors without using a for loop?
Tara - does your data set already have the NaN in it or are you constructing the *x* and *y* above with NaN inserted to indicate...

8 years ago | 1

| accepted

Answered
How can I open different file types with one skript
inah - use <https://www.mathworks.com/help/matlab/ref/fileparts.html fileparts> to get the file extension which you can then use...

8 years ago | 0

Answered
Plot not showing a line, only individual points(one at a time)?
Evan - with each call to *plot*, you are creating a new plot graphics object. Since you are not calling <https://www.mathworks....

8 years ago | 0

| accepted

Answered
i am working on matlab gui, where i am facing a problem when i browse image and want to convert that browsing image into LAB image it gave me error on push button 2
Suman - you haven't posted the error message but a guess may be with this line handles.s=image(handles.image); You are re...

8 years ago | 0

Answered
Undefined function or variable when passing arguments from command line
LD - _when I'm still in my matlab shell, and I try to print n1 or outfile again it gives me the error: Undefined function or var...

8 years ago | 1

Answered
How can I apply multiple in mintutes for loops to 365 days
Muapper - so you will need two arrays: one for each minute for every day of the year, and one array for the resistance per day. ...

8 years ago | 1

| accepted

Answered
How to use words in a matrix?
Taylor - if you are mixing numbers with strings, then create a cell array which will allow you to have elements of different typ...

8 years ago | 0

| accepted

Answered
rotate and crop image but get error (Subscript indices must either be real positive integers or logicals)
wisam - it could be that because you are using *floor*, then one of *i3_start* or *i4_start* are zero, since <https://www.mathwo...

8 years ago | 1

| accepted

Answered
Execute code from top to bottom
Erick - try calling <https://www.mathworks.com/help/matlab/ref/drawnow.html drawnow> after each change to the text in your text ...

8 years ago | 1

Answered
Subscripted assignment dimension mismatch.
Aziz - *size1* could be an array (depending upon the dimensions of ErrorProb_OrthTr_Gray3Orth1) so that is going to lead to a pr...

8 years ago | 0

Answered
i want to create A 3-D matrix and i want a pixel to be increasing by 1 in each of the matrix. how can i do that
Folakemi - the sytax m(:,:,k)(3,3)=t; is invalid. Do you really mean for *t* to be a 1x2 array with t = 0:1.0; o...

8 years ago | 0

| accepted

Answered
Problem 20 of Project Euler
Jonas - I wonder if this problem is trying to get you to come up with an alternative (to a *for* loop) algorithm to find the sum...

8 years ago | 0

Answered
how can i overcome this error
Shiraz - your function signature is function [R]= RCT3(i,j,k,m) which means that the output parameter from your function ...

8 years ago | 0

| accepted

Answered
Change string of static text boxes whose tag contains "Output"
Matt - the function <https://www.mathworks.com/help/matlab/ref/contains.html contains> looks to have been introduced in r2016b s...

8 years ago | 0

| accepted

Answered
How to get the order indices in a character array?
Akbar - if it is safe to assume that all elements in your string are separated by commas, you could use <https://www.mathworks.c...

8 years ago | 1

Answered
Can you adjust the dimensions of a ButtonDownFcn?
Alexander - since you are using <https://www.mathworks.com/help/matlab/ref/patch.html patch> to create each rectangle, then you ...

8 years ago | 1

| accepted

Answered
Prohibit "pcg" writing to command window
Daniel - Wow that is busy. Perhaps try doing [x,~,~,iter] = pcg(Id-(tspan(i+1)-tspan(i))*A, U(:,i)); U(:,i+1) = x; I no...

8 years ago | 0

| accepted

Answered
Problem with for loops
Jaime - please don't dynamically create variables. See Stephen's post at <https://www.mathworks.com/matlabcentral/answers/304528...

8 years ago | 0

| accepted

Answered
display the result in EDIT TEXT
narges - if you wish to write 'Area' in your text control, you would do something like set(handles.text1, 'String', 'Area');...

8 years ago | 0

Answered
How to plot two histogram in one figure with different start point?
Sara - have you considered perhaps subtracting your second data set from one so that it's histogram is reveresed? (Which is I th...

8 years ago | 0

Answered
How can I create a for loop to play two tones 5 different times?
Brandon - you can use the <https://www.mathworks.com/help/matlab/ref/audioplayer.playblocking.html playblocking> function of the...

8 years ago | 1

Answered
I have 'value' as a cell array (Size 160*1) contians S101,S100,S103, S102 randomly.I need to look for S100 followed by S102 in this cell array such that if t1 == 'S100' && t2 == 'S102'. How can I do that?
Bubblesjinx - if *t1* and *t2* are character arrays, then your condition would be if strcmp(t1, 'S100') && strcmp(t2, 'S102'...

8 years ago | 0

| accepted

Answered
I am trying to import this excel file and plot graph of three variable together when generate push button is pressed, this are my codes and excel file is attached here, can somebody suggest correction in codes?
Juned - given the code set(handle.Generate,'Enable', 'off'); %Generate is pushbutton to genetate plot axes(handles.axes1)...

8 years ago | 0

Answered
Change plot in single axes on click (GUIDE)
luiv1616 - see the attached code for a quick example. In the GUI OpeningFcn, we create the plots and hide all but the first one ...

8 years ago | 0

| accepted

Answered
how to create a loop for rolling window returns?
Giorgio - rather than dynamically creating variables (never a good idea, see <https://www.mathworks.com/matlabcentral/answers/30...

8 years ago | 0

| accepted

Load more