Answered
Matlab jumps over my if-statement in my GUI even if the value is true?
Matlab is case-sensitive: If, Else, End, Setappdata, Isempty will not work - use if, else, end, setappdata, isempty instead.

7 years ago | 0

Answered
Updating 'Base' workspace values using a GUI
Here is an example how you can achieve what you asked for, however if you decribe what you want to do we probably come up with a...

7 years ago | 0

Answered
force stop condition in a loop
You can use <https://de.mathworks.com/help/matlab/ref/oncleanup.html onCleanup>.Minimal exampel: mytest() function mytes...

7 years ago | 1

Answered
Problem 10 of MATLAB cody challenge
There are a few problems with your solution: # You need to return true/false - not as string # You compare values to be bigg...

7 years ago | 0

| accepted

Answered
Making STOP - Button
It is hard to guess why it _doesn't work_ without seeing any actual code. Your GUI is not frozen while your loop is running. ...

7 years ago | 2

| accepted

Answered
Subscripted assignment dimension mismatch.
You need to pay attention when using size. Even if your data is a vector size will return 2 values unless you specify a dimensio...

7 years ago | 0

Answered
color a cell excel using matlab
Actually your code looks good despite a small typo. Excel = actxserver('excel.application'); % ^ capita...

7 years ago | 4

| accepted

Answered
Key press counter not updating
Do you want to press a button or a key on your keyboard? It is both easy to achieve, but not clear to me which one you want. You...

7 years ago | 0

Answered
I have created a GUI to take some data from user and save this input in EXCEL file, but every time when user inputs the data and hits submit button the data is overwritten.
I don't have much time to test right now. This might work: sizes = get(handles.size,'value'); switch sizes ...

7 years ago | 0

Answered
Closing figs but keeping variables for later use
Yes, you can use setappdata/getappdata. Does not work is a rather weak describtion of the problem, without knowing what the p...

7 years ago | 0

Answered
App - changing button state when a uifigure is closed
I would actually expect a couple of error messages. app.ScriptWindow= uifigure('Position',[100 100 420 420],'Name','Sc...

7 years ago | 0

Answered
How can I add x1 to x5 in a loop
You can use sum() instead of manually adding x1 to x5. y=zeros(length(t),5); for j=1:length(t) y_m(j,:)=sum(x); en...

7 years ago | 0

| accepted

Answered
Why this error?
If rho2() returns a vector your calculation will result in a vector aswell. q1(j1,:) = (rho2(j1) - rho2(j1-1))*v2(j1-1...

7 years ago | 0

Answered
I have created a GUI to take some data from user and save this input in EXCEL file, but every time when user inputs the data and hits submit button the data is overwritten.
Aj cannot work, you are hoping that MATLAB takes A (not a string, probably doesnt even exist) and j (a double) and put them toge...

7 years ago | 0

Answered
passing uicontrol objects to uicontrol callbacks
There are several ways to pass data/handles between callbacks. For some in depth information you can check <https://de.mathworks...

7 years ago | 2

| accepted

Answered
vector equals to value in matrix
A=0.9997 and changing A in a loop are 2 different things. This code will return 1. gg=(0.35:0.0001:2); A=0.9997; a...

7 years ago | 0

Answered
Why I am getting the error message:Assignment has more non-singleton rhs dimensions than non-singleton subscripts
tmvVV(i,j)=vpasolve(teqsd(i,j),tmv); This line returns 2 values, but tmvVV(i,j) has only 1 field. Adding a third dimension ...

7 years ago | 0

| accepted

Answered
Why when i load workspace manually the code works but when i try to load it from code doesn't?
If you use load('mynet.mat') in command line you will load all variables in mynet.mat to your workspace. Hence myNet will exist ...

7 years ago | 0

| accepted

Answered
Error when generating a for loop with unifrnd
r(i) only has 1 field and you try to store 12 values. Try a = 0; b = 1:6; r=zeros(1000,12); for i = 1:1000; r(i,:)...

7 years ago | 1

Answered
Create a new matrix with the for loop
If (big if) i interpreted your code right you are trying to do something like this: w_u = zeros(361,361,252); w_v = ...

7 years ago | 0

| accepted

Answered
Replacing a value with nan
I read about this lately, NaN never equals NaN (some IEEE stuff). But you can use _isnan_ instead.

7 years ago | 0

Answered
Assign index to a matrix?
i think you could use eval to create your variable names for i=1:50 name=strcat('E',num2str(i)); prettyE(i)=eval(...

7 years ago | 0