Feeds
已回答
how to make a function that calculate consective difference of elements of a vector
If you insisnt on using for loops you just need to change the limit of the for loop to length(v)-1 and of course add ...
how to make a function that calculate consective difference of elements of a vector
If you insisnt on using for loops you just need to change the limit of the for loop to length(v)-1 and of course add ...
9 years 前 | 0
已回答
How can I get the value of toggle button (uicontrol)
You need to set a callback function for the button if you want something to happen when it is pressed. For example: % set c...
How can I get the value of toggle button (uicontrol)
You need to set a callback function for the button if you want something to happen when it is pressed. For example: % set c...
9 years 前 | 1
| 已接受
已回答
What does Subscripted assignment dimension mismatch mean? I keep getting the same error?
The error means that the destination is not the same dimension as the source. In this case, you are trying to write an 8x8 matri...
What does Subscripted assignment dimension mismatch mean? I keep getting the same error?
The error means that the destination is not the same dimension as the source. In this case, you are trying to write an 8x8 matri...
10 years 前 | 0
已回答
How to save data of UITABLE in Workspace
I think you are using uitable wrong. Look at the documentation for this function but I believe it should be something like this:...
How to save data of UITABLE in Workspace
I think you are using uitable wrong. Look at the documentation for this function but I believe it should be something like this:...
10 years 前 | 0
| 已接受
已回答
Writing data in file and naming file with a string value
Change your fopen line to: fileID = fopen(['error_', num2str(n), '.txt'],'a');
Writing data in file and naming file with a string value
Change your fopen line to: fileID = fopen(['error_', num2str(n), '.txt'],'a');
10 years 前 | 0
| 已接受
已回答
How do i create a loop that accesses more than one matrix?
Maybe try something like this for jj = 1:size(X,1) % match 1st column of X to 1st column in Y idx = find(X(jj,1) ...
How do i create a loop that accesses more than one matrix?
Maybe try something like this for jj = 1:size(X,1) % match 1st column of X to 1st column in Y idx = find(X(jj,1) ...
10 years 前 | 0
| 已接受
已回答
Get string value from GUI listbox
Change the condition on your if to if strcmp(ListBoxCheck, 'Afghanistan') Hopefully this should now work.
Get string value from GUI listbox
Change the condition on your if to if strcmp(ListBoxCheck, 'Afghanistan') Hopefully this should now work.
10 years 前 | 0
已回答
Loading in to the POPUP menu of GUI
You need to save and load the "Value" property of the popup menu. For example, taking Geoff Hayes's case: % get the value f...
Loading in to the POPUP menu of GUI
You need to save and load the "Value" property of the popup menu. For example, taking Geoff Hayes's case: % get the value f...
10 years 前 | 0
已回答
adjusting label and title thickness of the plot function
Just use the 'fontsize' attribute of the axes: set(gca,'fontsize',fontsize); % default fontsize is 10
adjusting label and title thickness of the plot function
Just use the 'fontsize' attribute of the axes: set(gca,'fontsize',fontsize); % default fontsize is 10
10 years 前 | 0
已回答
How to sum the fuel consumed at idle (vehicle speed=0)?
In order to get all indeces of speed=0 you need to do: IdleFuelIndex = find(VSPD == 0); Then you can add them all up: ...
How to sum the fuel consumed at idle (vehicle speed=0)?
In order to get all indeces of speed=0 you need to do: IdleFuelIndex = find(VSPD == 0); Then you can add them all up: ...
10 years 前 | 0
已回答
Advanced Plotting of graphs
You can use the plotyy command to plot two y axes with the same x axis. For example: [AX, H1, H2] = plotyy(s,v,s,t); Thi...
Advanced Plotting of graphs
You can use the plotyy command to plot two y axes with the same x axis. For example: [AX, H1, H2] = plotyy(s,v,s,t); Thi...
10 years 前 | 0
已回答
drawing specific histogram for errors.
You can use the hist command. For example for the parameter DS: [n xout] = hist(DS,100); 100 is an arbitrary number of bins ...
drawing specific histogram for errors.
You can use the hist command. For example for the parameter DS: [n xout] = hist(DS,100); 100 is an arbitrary number of bins ...
10 years 前 | 0
| 已接受
已回答
how can i insert markers and merge four graphs in one?
In order to change the markers you can change the 'marker' attribute on the line series. For example: [AX, H1, H2] = plotyy(...
how can i insert markers and merge four graphs in one?
In order to change the markers you can change the 'marker' attribute on the line series. For example: [AX, H1, H2] = plotyy(...
10 years 前 | 0
已回答
How to create a column vector where each element will be compounded amount by percentage of another vactor?
You need to use the function cumprod. In your example: x = [.2 .3 .4]'; z = 1000*[1; cumprod(1+x)]; This will give you ...
How to create a column vector where each element will be compounded amount by percentage of another vactor?
You need to use the function cumprod. In your example: x = [.2 .3 .4]'; z = 1000*[1; cumprod(1+x)]; This will give you ...
10 years 前 | 0
| 已接受
已回答
How to create a matrix for plotting from a roots matrix in a loop?
You can store the data into a vector: results = []; while (condition) code; r = roots(x); results(en...
How to create a matrix for plotting from a roots matrix in a loop?
You can store the data into a vector: results = []; while (condition) code; r = roots(x); results(en...
10 years 前 | 0
| 已接受
提问
Parameters imported using assignin not visible to parfor
I am runnig a function that uses a structure with many fields as an input. I use assignin to import all the fields as variables ...
10 years 前 | 1 个回答 | 0
1
个回答提问
How to password protect mat files
Hi all. I am looking for a way to password protect a .mat file. My requirements are that it cannot be changed or deleted with...
11 years 前 | 2 个回答 | 0
2
个回答提问
Idle labs on Parallel Computing Toolbox
I use a network server that is shared with other users in the company to perform heavy calculations with Matlab. My question ...
12 years 前 | 1 个回答 | 0
1
个回答已回答
Out of memory in parfor loop
You are running out of memory because parfor uses a lot more memory. Let's say for example, that each iteration of the regula...
Out of memory in parfor loop
You are running out of memory because parfor uses a lot more memory. Let's say for example, that each iteration of the regula...
13 years 前 | 0
| 已接受
已回答
adding values in array
If idx1 and idx2 are row vectors you can do idx3 = [idx1 idx2]; If they are column vectors do idx3 = [idx1; idx2];
adding values in array
If idx1 and idx2 are row vectors you can do idx3 = [idx1 idx2]; If they are column vectors do idx3 = [idx1; idx2];
13 years 前 | 0
| 已接受
已回答
list all subfolder names
Each time you save the parameter in a new .mat file, save that parameter to a new cell in a cell array. Then you can use a uitab...
list all subfolder names
Each time you save the parameter in a new .mat file, save that parameter to a new cell in a cell array. Then you can use a uitab...
13 years 前 | 0
已回答
how to correctly skip elements of a vector field table with 4 columns
Use this: ix=mod(V(:,1),2)==0 & mod(V(:,2),2)==0; V_SKIP = V(ix,:);
how to correctly skip elements of a vector field table with 4 columns
Use this: ix=mod(V(:,1),2)==0 & mod(V(:,2),2)==0; V_SKIP = V(ix,:);
13 years 前 | 1
| 已接受
已回答
Plotting a cell array with double values
Use testArray = [testArray{:}]; This will transform testArray into a regular array which you can plot using plot(te...
Plotting a cell array with double values
Use testArray = [testArray{:}]; This will transform testArray into a regular array which you can plot using plot(te...
13 years 前 | 2
已回答
matrix indexing and manipulation
You can use ind2sub. [rowIndex, colIndex] = ind2sub(size(Z),Index); I think this should work.
matrix indexing and manipulation
You can use ind2sub. [rowIndex, colIndex] = ind2sub(size(Z),Index); I think this should work.
13 years 前 | 0
| 已接受
已回答
how to get a 3D stem plot?
Try <http://www.mathworks.com/help/techdoc/ref/stem3.html |stem3|>.
how to get a 3D stem plot?
Try <http://www.mathworks.com/help/techdoc/ref/stem3.html |stem3|>.
13 years 前 | 4
| 已接受
已回答
How to access GUI workspace?
CLEAR only clears the current workspace, which is usually 'base'. Your GUI is run from a separate function which has its own wor...
How to access GUI workspace?
CLEAR only clears the current workspace, which is usually 'base'. Your GUI is run from a separate function which has its own wor...
13 years 前 | 0
已回答
define function which uses handles.variables
It is better to send all your 23 variables as one struct, both in terms of neater code and the time and memory it takes to alloc...
define function which uses handles.variables
It is better to send all your 23 variables as one struct, both in terms of neater code and the time and memory it takes to alloc...
13 years 前 | 1
已回答
Plotting a graph to show correlation of voltage over current
R=10; V = 0:2.5:Vmax; I = V/R; figure; plot(I,V) Type doc plot for more information.
Plotting a graph to show correlation of voltage over current
R=10; V = 0:2.5:Vmax; I = V/R; figure; plot(I,V) Type doc plot for more information.
13 years 前 | 0