Answered
Create and name a directory
Folder=pwd [PathStr,FolderName]=fileparts(Folder) DataFolder=['DATA-',FolderName] mkdir(DataFolder)

14 years ago | 0

Answered
The problem of removing the data from the matrix
So this is a nchoosek() combination problem. *The theoretical solution:* Use index=nchoosek(1:100,7) to generate all the poss...

14 years ago | 0

Answered
how could i create a limitter block signal only with upper limit
Use the MinMax block and select "Max" with 2 inputs.

14 years ago | 0

Answered
use same 3d view in different plots in gui
If you want to use the same 3-D graph viewpoint specification, use the same input arguments in view(). If you want to plot th...

14 years ago | 0

| accepted

Answered
GUI axes handle
The handle of the axes (or the tag of the axes) in your GUI made from GUIDE is unlikely to be handles.axes(2) or handles.axes(3)...

14 years ago | 2

| accepted

Answered
Stuck in a While loop...sometimes
I think it is this while loop that causes the problem. while new_dist(i) < prev_dist(i) It might be an infinite loop. A...

14 years ago | 0

Answered
The problem of removing the data from the matrix
The following code could solve your problem if you have enough memory. N is set at 10 first so you can try and understand the co...

14 years ago | 1

Answered
moving files sysntax
Your code should work. The only thing is that you need to run the code in the same folder where those data-* files are resident ...

14 years ago | 0

| accepted

Answered
.DAT file
Provide a snip of your example .dat file will be helpful. Check out the function textscan(), it can skip header lines. For some ...

14 years ago | 0

Answered
How i choose the best solver ?
See the link. <http://www.mathworks.com/help/toolbox/simulink/ug/f11-69449.html choosing a solver>

14 years ago | 0

| accepted

Answered
close terminal window
Assume you run your MATLAB code as system('MyProgram.exe') and it brought up that ugly black window but never exits, you can do ...

14 years ago | 0

Answered
All I want to do (initially) is read an Excel or csv file
try d=importdata('test.csv') and check the value of d in MATLAB workspace.

14 years ago | 0

Answered
How to alternately exclude raws of a table?
The problem is: the value of x is consecutive natural number, so you can use mod(T(:,1),SKIP) to do the skipping. The value of y...

14 years ago | 1

| accepted

Answered
Implicit function nonlinear curve fitting error-debugging mode
I saw a few problems. # Use of x (low case) and X (up case) as two variables is not a good idea. # diff is a MATLAB function...

14 years ago | 0

Answered
Bode plot of simulink model
To plot the Bode plot, you need the transfer function. [A,B,C,D]=LINMOD('SYS') obtains the state-space linear model of the ...

14 years ago | 0

| accepted

Answered
Using surf or equivalent with spherical coordinates
Use function sph2cart() to calculate the data needed by surf(). Let's say you want to draw a sphere with radius of 10, Phi from...

14 years ago | 2

Answered
Strange Problem when i write same code in function
try a=input('Type value of a \n'); b=input('Type value of b\n');

14 years ago | 0

| accepted

Answered
XLSwrite function
The problem is: Your resulting e is 1x17520, a row vector. Your specified position is 'D2:D17521', a column vector. This ...

14 years ago | 0

Answered
Data Import/export from figure Matlab GUI
After processing your original data, you can use xlswrite() or dlmwrite() or csvwrite() to write the data to a file. For more fl...

14 years ago | 0

| accepted

Answered
Passing Inports to output with Matlab Sim command
try [tout,xout,yout]= sim('mymodel',tend,simset('OutputVariables', 'txy','SaveFormat','StructureWithTime')); The argument C is...

14 years ago | 0

Answered
How do I grab the files names from a directory and store them in a matrix?
Files=dir('c:\output]*.csv'); Files.name Files is a structure array containing the file name and other info.

14 years ago | 0

Answered
Plot with step changes - no interpolation
stairs(1:10)

14 years ago | 4

| accepted

Answered
problem with if statement
What is wrong is that "0<ang<1.5708" is not a valid statement according MATLAB M-language syntax. You will need to use and(0<...

14 years ago | 0

Answered
How to add "..." to multiple lines
There is a better way. I assume you pasted the data so the data has multiple lines. You only need to add one "[" at the beginnin...

14 years ago | 0

| accepted

Answered
Combining Logical Indexes
What is the operation, and, or, plus, minus? bsxfun(@and,MyTickers,MyDates)

14 years ago | 2

| accepted

Answered
decimal day
%% Year=2011; Day=250; Hour=23; Minute=35; D=datenum(Year,1,1)+Day-1; [Year,Month,Day]=datevec(D); D=...

14 years ago | 0

Answered
Problem with saving Fis file
If you want to print out a similar figure as shown in the link, there is the "Print" menu under "File" <http://www.mathworks....

14 years ago | 0

| accepted

Answered
Displaying error messages on a MATLAB GUI
You'll need to use try-catch to catch a possible error and then use lasterr() to get the error message. Check the documentation ...

14 years ago | 0

| accepted

Answered
Generating a pdf file using Matlab
How did you generate the .doc file? Are you using the MATLAB Report Generator Toolbox? If you do, .pdf file is supported. <ht...

14 years ago | 0

Answered
how to link gui and simulink?
You need to be more specific. Overall, in your GUI function, you can use sim() to run the simulation of your Simulink model. The...

14 years ago | 0

Load more