Answered
display newline string from cell array
Elysi - how are you displaying the output of *fullsentence*? If you do fprintf(fullsentence) then you should see the \n e...

8 years ago | 1

| accepted

Answered
How do I pass a shell script variable as an argument to a matlab function?
The statement being passed to *matlab* needs to be in double quotes /Applications/MATLAB_R2014a.app/bin/matlab -nodisplay -r...

8 years ago | 0

| accepted

Answered
how to save the matrix after each iteration ?
riki - since your output array on each iteration is of the same dimension, then your matrix could be myData = zeros(384,768)...

8 years ago | 1

Answered
Multiply matrices of different sizes
NMans - if you want to multiply each column of the 100x7 matrix by the 100x1 matrix, then you could use *bsxfun* as X = rand...

8 years ago | 0

Answered
I have trouble making multiple dices change it's image using GUI.
Diane - as you have said, you have five axes to display the face of each of the five rolled dice. Your above code only seems to ...

8 years ago | 0

| accepted

Answered
error in getting output using pushbutton
srinija - the variable *popupmenu2value* is local to the *popupmenu2_Callback* function only and so is not accessible from the *...

8 years ago | 1

| accepted

Answered
save all for loop data into workspace
tarek - use a cell array to store the data (R) on each iteration of the *for* loop. For example, myImageData = cell(172,1); ...

8 years ago | 1

Answered
how to define a clockwise or counterclockwise angular vector based on a direction at the initial angular position?
Yizhou - this almost seems like a homework question so we can only give out hints. Let's assume then that you have three inputs ...

8 years ago | 0

| accepted

Answered
Whats wrong in this why I am getting this error while running the code "retrievedBits = bitget(I(1:numPixelsNeededForString), bitToSet);"??
Sahana - it looks like your code is taken from Image Analyst's File Exchange submission at <https://www.mathworks.com/matlabcent...

8 years ago | 0

Answered
Graph,Smallnetwrok,WattsStrogatz, confused command
Jan - *source* is a scalar from 1 to N and is used in newTargets(source) as an index. So newTargets(source) = 0; ...

8 years ago | 0

Answered
Automatic saving / writing of rows of a matrix as a file?
Tim - you can use <https://www.mathworks.com/help/matlab/ref/sprintf.html sprintf> to update the file name on each iteration of ...

8 years ago | 0

| accepted

Answered
MATLAB CODE NEWTON METHOD
Adomas - your code is using *n* as an index into *x*. On each iteration of the loop, you increment *n* by one in preparation for...

8 years ago | 0

Answered
Deleting strings in a list
Niels - you could try test(strcmp(test,'4.jpg')) = [] We use *strcmpi(test,'4.jpg')* to determine which elements of *test...

8 years ago | 2

Answered
Working with Popup Menu in GUIDE
Perez - use the callback function for the popup menu 1 button to update the categories in popup menu2. For example, functio...

8 years ago | 0

Answered
"tsmovavg not found." - Matlab2016a
Raquel - according to <https://www.mathworks.com/help/finance/tsmovavg.html tsmovavg>, this function is part of the Financial To...

8 years ago | 0

Answered
How to plot a broken horizontal line (ie, a horizontal line with whitespace)
Daniel - so if your array of zeros and ones is onOffData = logical([0 0 0 1 1 1 0 0 0 1 1 1]); and it maps to 1, 2, 3, .....

8 years ago | 0

Answered
Undefined function or variable 'r', but I am confident I defined it
Steelierelk - I suspect that the "Undefined function or variable 'r'" corresponds to the disp(r) line. If this ...

8 years ago | 0

Answered
What does this declaration do?
In your first example, >> dVdx(0,5E-6,[0.02]) I note how the first input 0 which is the *xval* is not used in your calcul...

8 years ago | 1

| accepted

Answered
I keep getting a "Struct contents reference from a non-struct array object" error within my code and cannot get it to run correctly. I am trying to run 2 differential equations at once using ode function.
tgm33518 - I'm guessing that the error is being generated for sSol(t) = S.s; (and probably will for the subsequent line t...

8 years ago | 0

Answered
How to change color of GUI window from Matlab command line
KAE - you might be able to use gcf (to get the handle to the current figure) if we assume that your figure/GUI has focus. Then c...

8 years ago | 0

| accepted

Answered
How can I use the function unique to the matrix with several rows?
Anatoly - try doing A = unique(A,'rows'); so that each row is treated as a _unique entity_. See <https://www.mathworks.co...

8 years ago | 0

| accepted

Answered
Can I use the input function to ask for both a number or a string?
Gavin - you could perhaps use <https://www.mathworks.com/help/matlab/ref/str2double.html str2double> to determine if the input i...

8 years ago | 0

Answered
Trying to form specific block matrix...
Ryles2014 - you could use the <https://www.mathworks.com/help/matlab/ref/diag.html diag> function as follows t = 10; s = 4...

8 years ago | 0

Answered
Help looping scalars in Euler Method function
hr - if you want your *h* to change from 0.5, 0.6,0.7,..., 3.0, then you can simply do for h=0.5:0.1:3.0 % do your calc...

8 years ago | 0

Answered
Not quite sure what I'm doing wrong for this calculator function problem
Kristen - when comparing strings, please use <https://www.mathworks.com/help/matlab/ref/strcmp.html strcmp> as you will get the ...

8 years ago | 0

| accepted

Answered
how can i plot the signal of the spoken text?
Sitara - perhaps you can write the spoken text to a wav file which you could then read in and plot. See <https://msdn.microsoft....

8 years ago | 1

| accepted

Answered
How to plot an NxN array of circles?
Viron - you could just create one circle within a 2-D array whose number of rows and columns are identical to the diameter of yo...

8 years ago | 0

| accepted

Answered
passing a 3d matrix to a function
Abdul - first, you didn't have to delete your previous question and repost. Just edit the existing one. As for *ccdf*, are yo...

8 years ago | 0

| accepted

Answered
Change While condition based on if statement
ben - I suppose you could use a function to evaluate your condition, and you would set the function based on the if/else from ab...

8 years ago | 0

Answered
shift matrix from a specific row
negin - if you want to insert *b* as the third row of *a* then you could just do a = [1,2,3;4,5,6;7,8,9;10,11,12]; b = [8 ...

8 years ago | 1

| accepted

Load more