Answered
Simple code for Mandelbrot set
Sye - see <http://stackoverflow.com/questions/20844510/coloring-the-mandelbrot-set-in-matlab> for an example of MATLAB code to c...

9 years ago | 0

Answered
Call a Pushbutton within a timer object using guide
Daemonic - you should be able to call the callback as you would any other function provided that you pass in the correct paramet...

9 years ago | 0

| accepted

Answered
Looping these equations over multiple workspace variable names
Lewis - just use an numeric (or cell) array to store all your wind data for each year instead of having all of this data spread ...

9 years ago | 0

| accepted

Answered
How to add a margin on a yield curve
Daniel - are you sure that *M* is simply a scalar 0.2 and is not an array with more than one element? The error message suggest...

9 years ago | 1

| accepted

Answered
Set class method as CloseRequestFcn
Sebastian - you can try the following function obj = myWaitbar() obj.cancel = false; obj.figHandle = figure('Clo...

9 years ago | 0

| accepted

Answered
Pixel Shuffling using Chaotic Tinkerbell map(https://en.wikipedia.org/wiki/Tinkerbell_map) and Henon Map(https://en.wikipedia.org/wiki/H%C3%A9non_map)
Renjith - the problem is with the *r* r = [round(abs((i^2)-(j^2)+(a*i)+(b*j))),round(abs((2*i*j)+(c*i)+(d*j)))] There is ...

9 years ago | 1

| accepted

Answered
Spectral Unmixing GUI; %% ??? Attempted to access C(1); index out of bounds because numel(C)=0.
Eugene - the only other function where you reference *M* is in *pushbutton7_Callback*. Note that *M* is only initialized depend...

9 years ago | 0

Answered
uicontrol selected properties in R2015
Christian - do you mean that you want to set focus to a specific edit text control? Please see <https://www.mathworks.com/help/...

9 years ago | 0

Answered
Interrupting a while loop in a callback with another callback
Leon - a problem with your *while* loop (I'm guessing since not all the code is shown) is that it is "tight" and so is not "inte...

9 years ago | 1

Answered
How can I run a .app mac programme from matlab?
Aaron - try using the <https://www.mathworks.com/help/matlab/ref/system.html system> function. On my Max OS X 10.11.6 running M...

9 years ago | 0

| accepted

Answered
Can I get code of command"impulse"?
Sajjad - if you are referring to this <https://www.mathworks.com/help/control/ref/impulse.html impulse> function, then you would...

9 years ago | 1

Answered
How do i change these for loops so that I get the right numbers for this "game"?
Mohannad - the _you can only collect the money from each board square that you pass through_ means that you can only collect mon...

9 years ago | 0

| accepted

Answered
I want to combine two or more matrices but not same size, example a=[1 2] a=[1 2 3 4 5] to a=[1 2 1 2 3 4 5]
Fajar - if a = [1 2]; b = [1 2 3 4 5]; then c = [a b]; should give the desired result.

9 years ago | 0

| accepted

Answered
Genetic algorithm giving errors - reg
According to the 2013a documentation found <https://www.mathworks.com/help/releases/R2013a/gads/genetic-algorithm-options.html h...

9 years ago | 0

| accepted

Answered
When I using append in guide where does my original code go?
Maria - did you try to save the GUI to a file that had been named the same as your program? I just tried that (R2014a, OS X 10....

9 years ago | 0

Answered
calling a matlab function with scalar type
No worries, Richard. One other thing you may want to consider trying is to cast your *x* to a double. The example x = 0.2...

9 years ago | 0

| accepted

Answered
please help me in fix this error of Attempt to reference field of non-structure array.
Pooja - see the documentation for this function at <https://www.mathworks.com/help/matlab/ref/audioread.html audioread>. It ret...

9 years ago | 0

| accepted

Answered
GUIDE - Control tables by slider
Ricardo - you will need to add two callbacks to each of your sliders so that when the user moves the slider, the callback will f...

9 years ago | 0

Answered
fsolve question ('undefined function or variable')
alvaro - what is the full error message? <https://www.mathworks.com/help/optim/ug/fsolve.html fsolve> is part of the *Optimizat...

9 years ago | 0

Answered
change the color of cell array in GUI
Hyo - please see <http://www.mathworks.com/matlabcentral/answers/25038-how-to-change-each-cell-color-in-a-uitable> for an exampl...

9 years ago | 0

Answered
How to specify a legend using pre-determinate matrix
Alaa - please make sure that your LG is a cell array as per the documentation at <https://www.mathworks.com/help/matlab/ref/lege...

9 years ago | 0

Answered
Undefined function 'contains' for input arguments of type 'char'
Jennifer - which version of MATLAB are you using? According to <https://www.mathworks.com/help/matlab/ref/contains.html contain...

9 years ago | 1

Answered
Create vector for data after each iteration of a for loop
Matthew - try doing the following y = x; z = 0*y; myVector = zeros(N+1,1); for n = 0:N z = z+1+2.*n myVect...

9 years ago | 7

| accepted

Answered
Creating a guess and check loop
William - yes, a *while* loop seems reasonable. You will want to put an upper bound on the maximum number of iterations that yo...

9 years ago | 1

| accepted

Answered
How to make a GUI that outputs data from SQLdatabase corresponding to the input?
maybellene - if you are using GUIDE (and I suppose even if you aren't!) you would need to use the listbox callback function whic...

9 years ago | 0

| accepted

Answered
How to create an increasing sequence that resets when a cell array of strings changes?
Bryan - once you have calculated *t.Reps*, you could do the following % current row index rowIdx = 1; while true ...

9 years ago | 0

| accepted

Answered
error in running loop : the resultant is giving an empty array
summyia - I think that the problem is with the line for k=numel(Time_of_machine_inCells) *k* is being initialized to a s...

9 years ago | 1

| accepted

Answered
Error while evaluating uicontrol Callback
Diem - your above code is incomplete as the error message is referencing code that does not exist in what you have copied and pa...

9 years ago | 0

| accepted

Answered
MATLAB cannot write text on images
Debangshu - according to <https://www.mathworks.com/help/vision/ref/inserttext.html#inputarg_text insertText text input argument...

9 years ago | 0

Answered
How do I use several if statements in a single loop?
gsourop - couldn't you do something like [macdvec, nineperma] = macd(y); myMacData = zeros(length(macdvec),1); for t=1:l...

9 years ago | 0

| accepted

Load more