Answered
create .gif animation with mixed subplots of grayscale and color figures
derbruin - if you know the number of images that you have, *numImages*, then why not combine the two loops as numImages = 20...

11 years ago | 0

Answered
How to return loop result (string) from an mfile to another mfile(editText GUI)?
Ria - you really should post code that actually works. Your return value from this function is named *a* but nowhere in your fu...

11 years ago | 0

| accepted

Answered
Vectorizing a For-Loop
Pyroholic - unless there is a typo in your code, it would appear that the dependence in the inner *for* loop on the index variab...

11 years ago | 0

Answered
How to do an 'if loop' that finds if a column vector contains a string
Joey - consider using <http://www.mathworks.com/help/matlab/ref/strfind.html strfind> or <http://www.mathworks.com/help/matlab/r...

11 years ago | 0

Answered
Hi! I am making a simple gui, in the code below i am using the global variables rs ,rsh, a1,a2 . On execution these variables are not taking the value entered they turn to 0. Please advise.
SHAMBHAVI - it is unclear from your above code where each line fits into the GUI. I suspect that every three lines or so fits i...

11 years ago | 0

Answered
how to stop simulation when enter in a infinite loop
Mudasir - sometimes, if I have written some code that makes use of a *while* loop, I will include a maximum iteration counter to...

11 years ago | 0

| accepted

Answered
Display Disparity Map in GUI Axes
Pankaja - if you are using this code to display the image correctly in a figure, figure imshow(disparityMap, [224,352]);...

11 years ago | 0

| accepted

Answered
Updating guidata between multiple callbacks with one button in Matlab GUI
Niklas - I copied and pasted your above code into a simple GUI and did not notice any problems with the callbacks firing properl...

11 years ago | 0

Answered
Trying to Save all my inputted data from my for loop. I need to save the the Values of A,B and C into one matrix.
Sayyid - if you are expecting the user to enter numeric data, then you could just use an array to store this information. Try s...

11 years ago | 0

Answered
Rethrow a whole error as warning
Alessandro - try using the MATLAB error's *stack* field to get more of the information that you may want. For example, you coul...

11 years ago | 1

Answered
how can i count number of particles in each grid box after running this code ??
sneha - if you have the *Statistics Toolbox* you may be able to use <http://www.mathworks.com/help/stats/hist3.html hist3> to cr...

11 years ago | 0

| accepted

Answered
How to run a function?
Diego - when I run the above code, I observe the same error. This is because your anonymous function *f* is defined as a functi...

11 years ago | 0

Answered
how to use loop
Paulin - use <http://www.mathworks.com/help/matlab/ref/xlsread.html xlsread> to read the data from the Excel spreadsheet. Presu...

11 years ago | 0

Answered
What should i use if i dont want to perform any operation?
Peyush - use what you have above and just do nothing for the second condition. Write a comment to make it clear that this is in...

11 years ago | 0

| accepted

Answered
how we can program ring topology
Mudsair - it seems that you just need some kind of "sliding window" to operate on your array. For example, you could do the fol...

11 years ago | 0

| accepted

Answered
Max of cells. Keep whole Column
Martin - you could try iterating over each pair of columns and store the value of the *horsepower* variable (if it exists) along...

11 years ago | 0

| accepted

Answered
How do I change all the elements in matrix with an index larger than a certain number to zero?
Cyrustd - you almost have it, but I think that your code is just missing the range of the third dimension that you wish to be al...

11 years ago | 1

| accepted

Answered
Plot two figures using GUI
Rihanna - you would need to put the code to build each figure within the callback for each of your push buttons. Also, you woul...

11 years ago | 0

Answered
for loop with vectors of different dimensions help
Soloby - please clarify what you mean by _this doesn't seem to work_. What is the problem? Are you observing any errors, and i...

11 years ago | 0

Answered
Gui - Two plots in new figure - handles
Elias - from your example, it sounds like you have two GUIs and you want to plot the data on each one (though it isn't clear to ...

11 years ago | 0

Answered
How can I fit a large sized GUI on a small screen, without forcibly squeezing in the objects but giving an option to scroll ?
Eshwar - have you looked at these <http://www.mathworks.com/help/matlab/creating_guis/gui-options.html GUIDE options> with respe...

11 years ago | 0

Answered
Not working, mohr circle
Maria - the error message is telling you that have incorrectly setup your MATLAB file, *P.m*. You cannot include a function wit...

11 years ago | 0

Answered
Radial Basis Function help
Seemab - according to the documentation for <http://www.mathworks.com/help/nnet/ref/newrb.html newrb>, the input matrices *P* an...

11 years ago | 0

| accepted

Answered
How do I multiply 2 1 by 200 vectors and record when a particular answer is achieved?
Ed - the easiest (and so not the most efficient) is to use two *for* loops to iterate over the data. For example, A = randi...

11 years ago | 0

Answered
Hello, I'm extremely new to Matlab and I was looking for some help on a calculator I'm creating.
Tim - if you are not going to use GUIDE to develop your GUI, you can try to do the following. Move your *round_pts* and *newdb*...

11 years ago | 0

Answered
Matlab GUIDE push button does not get updated handle
Sedy - how are you verifying that the values are not changing? (You did not attach any code. You must press the *Attach File* ...

11 years ago | 1

| accepted

Answered
how can I play audio in matlab?
Eran - see <http://www.mathworks.com/matlabcentral/answers/134304-how-do-i-generate-sound-using-matlab> which describes a couple...

11 years ago | 0

Answered
When I open the GUI by 'run'-ning the code, it runs but when I open the GUI from the .fig file and run it, it gives me error
Anik - the GUI is not meant to be run/executed by double-clicking on the *.fig file. It can be run by calling (from the Command...

11 years ago | 0

| accepted

Answered
Could you help me to get started with this complex task?
Abel - your *cells* variable is a 1440000x10 double array, so loop over each row as numRows = size(cells,1); for k=1:num...

11 years ago | 0

Answered
How to find a number location in a multiple sub-matrices?
Mohammad - <http://www.mathworks.com/help/matlab/ref/rand.html rand> is the name of a built-in MATLAB function so you shouldn't ...

11 years ago | 0

Load more