已回答
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.

6 years 前 | 0

已回答
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...

6 years 前 | 0

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

6 years 前 | 1

已回答
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...

6 years 前 | 0

| 已接受

已回答
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. ...

6 years 前 | 2

| 已接受

已回答
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...

6 years 前 | 0

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

6 years 前 | 4

| 已接受

已回答
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...

6 years 前 | 0

已回答
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 ...

6 years 前 | 0

已回答
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...

6 years 前 | 0

已回答
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...

6 years 前 | 0

已回答
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...

6 years 前 | 0

| 已接受

已回答
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...

6 years 前 | 0

已回答
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...

6 years 前 | 0

已回答
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...

6 years 前 | 2

| 已接受

已回答
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...

6 years 前 | 0

已回答
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 ...

6 years 前 | 0

| 已接受

已回答
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 ...

6 years 前 | 0

| 已接受

已回答
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,:)...

6 years 前 | 1

已回答
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 = ...

6 years 前 | 0

| 已接受

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

6 years 前 | 0

已回答
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(...

6 years 前 | 0