Answered
close command / dos window
If you must use the trailing '&' to dispatch the command window to the background while the Matlab system continues, then you do...

9 years ago | 2

Answered
How do I find peak duration with the following scatterplot?
load Time_X.txt load Turbid_Y.txt thrsh=55; % the threshold ix=(Turbid_Y>thrsh); % locations above...

9 years ago | 0

| accepted

Answered
How to create an double for loop in matlab?
_"I have 4 matrices in list names A through D..."_ Don't do this! See <http://matlab.wikia.com/wiki/FAQ#How_can_I_create_var...

9 years ago | 0

Answered
How to convert structured .mat to .csv
Look at doc struct2cell If the whole structure is numeric, then (and only then), you can convert it to an array or vecto...

9 years ago | 0

Answered
Can anybody edit this code such that everytime loop runs, line gets printed to the row next to the already printed row in results.csv file?
_" can't open the file outside the loop since it is part of a large program"_ Of course you can (and it's the only practical ...

9 years ago | 0

Answered
Create cell array of cell arrays from data file
# _"How do I create a cell array of n empty cell arrays, where n can vary?"_ |*C=cell(n,1);*| # _"Is there ano...

9 years ago | 0

Answered
Data extraction from .csv and .txt files
_"I'm not quite sure how to open individual files based on a row of the subject database_" Well, it's not the row of the data...

9 years ago | 0

| accepted

Answered
Plotting confidence intervals-lines in one graph with means inside
As stylistic aside, in Matlab "use the vectors, Luke!" :) Replace the loop with the vectorized equivalent; NB: the "dot" op...

9 years ago | 0

| accepted

Answered
how to delete an entire column from a matrix if there is a certain number in that column?
B=A(:,~any(A==9)); If you don't need _A_ any longer, it's just a simple to do it in place... A(:,any(A==9))=[];

9 years ago | 0

Answered
When I run my MATLAB, it generate letters (what I want) for little matrix, but when the matrix is too long, it also run but generate symbols rather than letters
ASCII printing characters are in range of decimal 32-126 with some other symbols in most character sets scattered around above. ...

9 years ago | 0

Answered
How do I read a csv file that has text and numbers?
doc textscan Was busy last night, sorry... _"... 6 rows of text then 2000 rows of numbers ... want to read the numbers"_ ...

9 years ago | 0

Answered
Write (and generate) text and numeric data into one txt file
>> fmt='REGION s1-%d\nCOORDINATE %d 1 1 \n/\n'; >> fprintf(fmt,[1:3;1:3]) REGION s1-1 COORDINATE 1 1 1 / REGION s1-2 CO...

9 years ago | 0

Answered
¿How to change title of plot while using quoted text, variables, multilines and Fontsize?
hTl=title({'\bfLine 1';'\rmLine 2'},'fontsize',17); *Addendum* Missed the 'quoted' string--you just have to "double-up" t...

9 years ago | 1

| accepted

Answered
fclose() doesnt work
Probably in your testing you have had an error or other misstep along the way in which you have overwritten the file handle vari...

9 years ago | 0

Answered
How do I calculate a sum associated with text from an Excel file?
It would be better to regularize the spreadsheet first but presuming that's not practical, try the following... xlRange = '...

9 years ago | 0

Answered
For looping problem: storing all answer in array
... IDX=0:30:90; % make the loop values variable qopt=zeros(size(IDX);, % to save temporary ...

9 years ago | 0

| accepted

Answered
Double y-axis plot
_"column 1 are datenum values, ... column 2 and 3 ... on the left and ... column 4 on the right"_ Nothing to it... :) [h...

9 years ago | 0

| accepted

Answered
Polar plots of Angular data
For starters, "salt to suit"... >> theta=rand(3,1)*2*pi; r=ones(size(theta)); % arbitrary r,theta vectors >> hLp=polar...

9 years ago | 0

Answered
Where to find the file generated by ann2rr() ?
function varargout=ann2rr(varargin) [RR,tms]=ann2rr(recordName,annotator,N,N0,consecutiveOnly) Wrapper to WFDB ANN...

9 years ago | 1

| accepted

Answered
How do i append new columns or rows into existing Excel file?
TMW has only supplied the |*xlsread/write*| pair as packaged high-level functions interacting with Excel. If you know the size ...

9 years ago | 0

| accepted

Answered
dtstr2dtnummx with milliseconds
Well it dawned on me overnight--that's the helper private function |*datenum*| uses so the |*datenum*| formatting comments above...

9 years ago | 0

Answered
Setting and saving markers on plots
You might look at the code in Answer to a slightly different question just the other day where I drew a plot that does something...

9 years ago | 0

Answered
function with multiple datasets
Repeating with only some minor changes from the previous to get you started...begin with the script to read the files and create...

9 years ago | 0

Answered
Inputname statement - useful example
I don't know as I have a directly useful real example on hand, and in general functions shouldn't rely on needing outside knowle...

9 years ago | 0

Answered
How can I modify the findpeaks command to give me a width at 80% of peak height (instead of at the build in 'halfheight')?
I'd suggest _*not*_ modifying |*findpeaks*| but to postprocess the results instead--a sample from one of the examples of the bas...

9 years ago | 1

| accepted

Answered
plotxx scattered plot with smooth line and marker
|*plotxx*| is a File Exchange submittal -- and looks to be pretty limited in its implementation. If you start with it, you'll ha...

9 years ago | 0

Answered
Tracking boxplot x axis labels
OK, I came in late and just picked up on the _'ticklabel'_ part of the conversation. Went back to the beginning and looked at t...

9 years ago | 1

| accepted

Answered
i am taking data from a txt file and doing some calculations on it and thn saving results into another. txt file but when i m opening it it is showing garbage value?
Just using a filename extension of _".txt"_ doesn't change the default behavior of |*save*| which is _*binary .MAT-file*_ format...

9 years ago | 0

Answered
How do I add a month as the xlabel on a grouped bar graph?
You can try it, but I doubt the _ticklabel_ property has been updated to accept categorical variables-- set(gca,'xticklabel...

9 years ago | 0

Answered
Second x-axis overwriting previous plot
The thing in the example you didn't copy is the use of |*line*| instead of |*plot*| to draw onto the second axis. |*plot*| does...

9 years ago | 0

Load more