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

etwa 8 Jahre vor | 1

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

etwa 8 Jahre vor | 0

| akzeptiert

Beantwortet
Matlab GUI: push button when pressed signal is graphed on axis 1. There are 4 edit textboxes for the upper and lower x and y limits. How do I code the callback for these edit textboxes so that when a user types in a limit the graph is updated
Mike - are you using GUIDE, App Designer, or are you programatically creating your GUI? In any case, you should have a callback ...

etwa 8 Jahre vor | 0

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

etwa 8 Jahre vor | 1

| akzeptiert

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

etwa 8 Jahre vor | 0

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

etwa 8 Jahre vor | 0

| akzeptiert

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

etwa 8 Jahre vor | 0

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

etwa 8 Jahre vor | 1

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

etwa 8 Jahre vor | 1

| akzeptiert

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

etwa 8 Jahre vor | 0

| akzeptiert

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

etwa 8 Jahre vor | 1

| akzeptiert

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

etwa 8 Jahre vor | 1

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

etwa 8 Jahre vor | 0

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

etwa 8 Jahre vor | 0

| akzeptiert

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

etwa 8 Jahre vor | 0

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

etwa 8 Jahre vor | 0

| akzeptiert

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

etwa 8 Jahre vor | 0

| akzeptiert

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

etwa 8 Jahre vor | 1

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

etwa 8 Jahre vor | 1

| akzeptiert

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

etwa 8 Jahre vor | 0

| akzeptiert

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

etwa 8 Jahre vor | 0

| akzeptiert

Beantwortet
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');...

etwa 8 Jahre vor | 0

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

etwa 8 Jahre vor | 0

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

etwa 8 Jahre vor | 1

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

etwa 8 Jahre vor | 0

| akzeptiert

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

etwa 8 Jahre vor | 0

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

etwa 8 Jahre vor | 0

| akzeptiert

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

etwa 8 Jahre vor | 0

| akzeptiert

Mehr laden