已回答
Iteratively wants to change column while reading MS-Excel sheet
I recommend to use xlsread just once to retrieve all your data. They will already be stored in a neat cell structure ready to be...

6 years 前 | 0

| 已接受

已回答
How can I give user defined Yes No for multiple set of code?
a=input('Do you like triangles? Y/N','s'); if strcmpi(a,'y') %triangles elseif strcmpi(a,'n') %no trian...

6 years 前 | 1

| 已接受

已回答
why i cannot genereate the answer?
I agree with Stephen and Guillaume that else if should be elseif instead. I'd like to point out that there is another problem...

6 years 前 | 0

已回答
How do i use a pair of nested for loops to store a series of 9 related numbers in a 3x3 matrix?
I hope i got the question right (some possible solutions with increasing number of loops): %no loop a=1; b=1;...

6 years 前 | 0

已回答
how to sum a vector without sum function
If the only requirement is to not use _sum_, i'd like to suggest to use _cumsum_ instead! A=cumsum(StrengthVector); ...

6 years 前 | 1

已回答
Recreating a figure from its handle after it has been closed
You can change the CloseRequestFcn of your figure to turn your figure invisible rather than closing it. As long as you keep your...

6 years 前 | 0

已回答
problem with coding cumsum statement
Your data are stored as cells, not as matrix. Your values are also strings and need to be cast to numbers first. This code might...

6 years 前 | 0

| 已接受

已回答
Create a GUI (which aim to show and change a list of variables) dynamically based on the number of variables
As Stephen already pointed out this becomes way easier if you index your structure. %creating 'Variables' Variables(1).v...

6 years 前 | 1

| 已接受

已回答
I want to have a sequence of vectors using the following loop. but when i run the mat lab it will say "Subscripted assignment dimension mismatch." what can i do to index vectors and matrix.
There are a few errors in your code: # You try to assign 3 values [1 4 6] to only one field in x. This will not work unless x...

6 years 前 | 0

已回答
For Loop Moving Through Array
You overwrite A in every iteration and you are calculating the same value over and over again (not using N anywhere). I am no...

6 years 前 | 1

已回答
Export to Excel from MATLAB GUIDE GUI (user defines filename and directory)
Every function has its own workspace. Your function does not know x_data, y_data, accel_data and velocity_data. There are severa...

6 years 前 | 0

已回答
why not it work between 1 and 10?
I think it is unlikely, that one number is smaller than 1 and bigger than 10 at the same time. num = input('enter a number ...

6 years 前 | 1

已回答
Help needed with the program
As Kalyan Acharjya has already shown the actual error is a wrong parenthesis. if(M == 1 && D ==1) || (M == 7 && D == 4...

6 years 前 | 0

| 已接受

已回答
Matrix dimensions must agree error
I hope i understood your code right, this might help: t = sample.VarName1; X = sample.VarName2; indexOfComments = fin...

6 years 前 | 0

| 已接受

已回答
Writing key presses and time point of presses to file
This should work for numbers and letters, avoid space,cr,tab ... It also overwrites your old file if you don't change the fil...

6 years 前 | 0

已回答
How to fix error index exceeds matrix dimensions. I am very new to matlab and am trying to write a loop for this data set but I keep getting this error. Any help would be appreciated!
You remove rows of Data, thus its size is shrinking during your loop. One way to resolve this is removing those rows after your ...

6 years 前 | 0

| 已接受

已回答
I want only one value stored in this code
Does v actually contain negative values? Else every value in s will be greater 4 after it exceeds this threshold for the first t...

6 years 前 | 0

| 已接受

已回答
App Designer: How to open a second GUI or a new window with panels, lamps, edit fields, etc. by a ButtonPush callback ?
You can create a 2nd app with appdesigner and call it from your first app. Your callback should look like this: function b...

6 years 前 | 4

| 已接受

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

| 已接受

已解决


Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

6 years 前

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

加载更多