I want to repeat this code 32 times and each time stores the result to get matrix 1*32
Osama - presumably you want to store the counter value from each of the 32 iterations so you could do something like n = 32; c...

14 dagar ago | 0

| accepted

Legend with a variable in it
Zhen - from legend properties you need to set the Interpreter property to none to display literal characters. Try doing Name = ...

15 dagar ago | 0

| accepted

help with my home work plzzzz
Bader - look closely at the line for i=1;r; You have a semi-colon between the 1 and the r. Replace with a colon and it will wo...

15 dagar ago | 0

How can I make this code like a cycle?
JM - perhaps you can just replace the if/else block with maxIterations = 1000; atIteration = 0; while (abs(E1)>E || abs(E2)>E...

15 dagar ago | 1

| accepted

How to find the derivative of y with respect to x (hard code derivative equation into the m-file, do not use symbolic toolbox)
Jacky - if your cost equation is (with x the variable and D and L are constants) f(x) = (2.5*10^6)*sqrt(D^2 + x^2) + (2.0*10^6)...

15 dagar ago | 0

| accepted

Carla - I don't think that you can access your device storage from the MATLAB app for the Android phone. From MATLAB Mobile, you...

15 dagar ago | 0

Outputs into a vector
Mohsen - you've already declared D_max and L_max as arrays with D_max=zeros(1,9); L_max=zeros(1,9); so all you need to do is ...

16 dagar ago | 0

Best function instead of for loop and if loop
HG-NU - try something like A=[1 2 6; 1 2 2; 1 2 3]; Show = A(:,end); % <---- get the last column of A Show(Show...

16 dagar ago | 1

| accepted

Problems with integers help
Juan - please clarify what you mean by it doesn't work. Are there errors? If so, what are they? When I run your code (as is) I s...

16 dagar ago | 0

| accepted

Conversion of argument 2 from "real_T [2]" to "const int []" not possible;
Bhushan - I don't use Simulink so don't know for sure if this will work but if the error message is telling you that it can't co...

18 dagar ago | 0

| accepted

Retrieve variables from inputdlg in a GUI
Yasser - assuming that the user doesn't press cancel, then the project name and number can be retrieved from the cell array Proj...

20 dagar ago | 1

| accepted

How can i display output in text edit boxes?
Grace - if you get values from the text edit controls as x0 = app.initial_x_position.Value; then you should be able to set in ...

20 dagar ago | 1

| accepted

How can you store values in App Designer like you can in GUIDE?
Ruger28 - you probably want to use properties. See Share Data Within App Designer Apps for details.

21 dagar ago | 0

| accepted

Unrecognized function or variable 'MWplotcalcIntegT_OpeningFcn'
Michael - look at this code gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singl...

22 dagar ago | 0

MATLAB GUI - Select a point on a plot and run a function with a push button
Pedro - in the OpeningFcn for your GUI, add a button down callback for your axes: set(handles.axes1, 'ButtonDownFcn',@axesButto...

22 dagar ago | 1

| accepted

function [country,C,date0] = getDataUSA_CDC() Error: Function definition not supported in this context. Create functions in code file.
Hemanth - I suspect that you are copying and pasting this code into the command window. Since this code is a function (as given ...

22 dagar ago | 0

| accepted

Problem with answer 15.2 Creating and Calling Functions: (4/6) Create and Call a Function, task 1 MATLAB Fundamentals
Gareth - did you update the function signature as well so that it accepts two inputs? Presumably you have defined the function (...

22 dagar ago | 1

| accepted

Create a set of sets
David - try using a cell array: V = {[1 2] [1 3] [1 2 3]};

22 dagar ago | 0

| accepted

How to make a flashing movie? Please suggest any approach without application of any specific toolbox.
Yanjinsuren - do you really mean to create a movie (say with videowriter) or do you just want to have the circle alternate betwe...

23 dagar ago | 0

| accepted

toggle and elseif in matlab
Shivaani - I think that all the code is asking you to do is to add another variable called doDisplay and an elseif that would ch...

23 dagar ago | 0

| accepted

How can i use a switch and a drop down menu? matlab appdesigner
Ashwin - one problem with your conversiontypeDropDownValueChanged callback, you are using the same variable name for to represen...

23 dagar ago | 0

| accepted

Plotting a variable that changes in a loop iteration vs the iteration number
Colin - outside of the while loop, just do plot(diff_u); But is that what you really want to plot? Your comment %if max_diff ...

23 dagar ago | 0

| accepted

Selecting a dropdown value and getting an answer AFTER pressing button (in App Designer)
Jo - I think that you can just access the drop down value directly from the button callback (you probably don't want to be calli...

26 dagar ago | 0

| accepted

Unable to perform assignment because the size of the left side is 145863-by-2 and the size of the right side is 106796-by-2.
Lasse - you could try to use padarray if you have the Image Processing Toolbox or you could try Home = []; c= 1:2; for i= 1:s...

26 dagar ago | 0

| accepted

Updating textbox with variable
George - if you want to just update the existing annotation (rather than creating a new one on each iteration of the while loop)...

26 dagar ago | 0

whenever i call the recognition push button in my gui interface the error message is showing
indrani - you haven't posted the full error message but presumably it has something to do with CCoeff = corr2(A,B) where A and...

26 dagar ago | 0

Matlab figure with a variable in it
wallflower - you can set the name property of the figure. Perhaps try temperature = 90; hFigure = figure('Name',sprintf('figur...

27 dagar ago | 1

How do I make a for loop that averages the first 150 values of vector, x, saves it, and then averages the next 150 values of the same vector, x, saves it, and continues for the entirety of the vector, x.
Caesar - if you need to use a loop (as you have shown above) then you can set the step size to be 150 and try something like fo...

28 dagar ago | 0

| accepted