Answered
Script help: Import several .txt files into a single data matrix
d=dir('*.txt'); a=zeros(300,length(d)); % use given known size; if unknown read first outside loop for i=1:length(d) ...

12 years ago | 0

Answered
Dynamically rename existing structure arrays
Just concatenate them as you read the files... alldat=[]; % an empty holder for s=1:2 for r=1:2 alldat=[a...

12 years ago | 0

Answered
NEED HELP WITH LOADING DATA
Looks like you've got 51 rows of 10 columns there are in the cell array C. I'd say you've got the data "loaded" just fine. W...

12 years ago | 1

Answered
Standardisation and measurement criteria
>> x=1:10;x=x';y=rand(size(x)); % some toy data >> [b,~,~,~,stats]=regress(y,[ones(size(x)) x]); % not standardized >...

12 years ago | 1

| accepted

Answered
How to generate just one random number in every iteration of for loop?
Not as long as you don't write the code that way it won't... doc rand

12 years ago | 1

Answered
How to sort and open up text files titled in a range of numbers
*datenum* returns a Matlab serial date number for the given date/time input as a double. The whole number is the number of days...

12 years ago | 0

Answered
Changing title, line color, weight etc in errorbar figures
_My goal was to graph each row separately..._ Given the default orientation of Matlab and *plot* and *errorbar* to plot data ...

12 years ago | 0

Answered
Performance decrease accessing elements >4-D matrix
I didn't read your test code but...addressing will be fastest in the real code if order is sequential in column-major order...th...

12 years ago | 0

Answered
How to do interpolation of an unevenly sampled matrix?
And where is the time at which they were sampled from which to interpolate? Come on here, give us some help... In general...

12 years ago | 0

Answered
fprintf to create a file / precisions
A) fmt='%i\t%i\t%i\t%f\t%i\t%f\t%s\n'; fprintf(fid,fmt,index,addr,amptotal0,amptotal,amp2,theta,char(signal)) B) <...

12 years ago | 1

| accepted

Answered
take the average of each column element of two rows (in a 2 dimensional array) and insert that average between the two rows
The specific answer could be x=[x(1,:);mean(x);x(2,:)]; As Wayne points out, you've not provided sufficient info to know...

12 years ago | 0

Answered
incomplete minor gridlines in semilogx plot
It's a fignewton of the handle graphics and incomplete log cycles(*). AFAIK other than drawing the lines manually, all you can ...

12 years ago | 1

Answered
incomplete minor gridlines in semilogx plot
AFAIK only drawing them manually or increasing the width. Here experimentally I've determined that the internal logic will draw ...

12 years ago | 0

| accepted

Answered
Read and write multiple excel files.one after the other
Basically, what I'm saying is SEfile = '<file1location>'; LBfile = '<file2location>'; dstfile = '<destinationfileloca...

12 years ago | 1

| accepted

Answered
How to sort and open up text files titled in a range of numbers
datenum([735598.475717593]) Don't need *datenum*; _735598.475717593_ _*is*_ already a serial date number. The expression...

12 years ago | 0

Answered
creating new vector that is a combination of two interpolated vectors
i1=ceil(max(A(1),B(1)); % greater of the two start values rounded up i2=floor(min(A(end),B(end))); % end is minimum o...

12 years ago | 1

Answered
Complicated Question / String Arrays
new= cellfun(@(x) x(1:5),old,'uniformoutput',false);

12 years ago | 1

| accepted

Answered
How to sort and open up text files titled in a range of numbers
Use the time stamp as it was generated to create a list and iterate over it. I presume there's a meaning for 123000 and 321000 ...

12 years ago | 0

Answered
How can I store vectors from three loops?
Sure it works, just write d(i,j,k) But, since Matlab doesn't allow for starting arrays with lower indices other than 1, you'l...

12 years ago | 1

Answered
cell array question finding minimums of intervals of time matrices
dt=cellfun(@diff,array,'uniformoutput',false); mindt=cellfun(@min,dt); doc cellfun % for the gory details...

12 years ago | 1

| accepted

Answered
Using PLOTYY with multiple arrays of different sizes.
_...size(x1)~=size(x2))_ _It would therefore seem that I could do this:_ _plotyy([x1,x2],[y1,y2],x3,y3)_ I don't see wh...

12 years ago | 2

Answered
Read and write multiple excel files.one after the other
<http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F> I am _extremely_ partial to the *dir* solution; i...

12 years ago | 1

Answered
Dimension error using VERTCAT, but pretty sure dimensions are consistent
_...rawdata is a numeric matrix...text is a string matrix..._ Text matrix contains the labels I want to add to the rawdata ma...

12 years ago | 0

Answered
My graph in matlab has a blank strip in the middle
z(isnan(z))=0; surf(x,y,z) I didn't look to see which term precisely causes the problem but you've got a numerical issue...

12 years ago | 1

Answered
Elegant way to know in which iteration of for I am
_...Can a switch work if I do:_ switch protocol_ID case 1 || 4 case 6 || 7 Not in that exact syntax, no, but ...

12 years ago | 1

Answered
Odd output from ind2sub
(max(max(t(:, :, 1560)))) is a single value for the maximum of the values of the requested plane. Thus there isn't any act...

12 years ago | 0

Answered
Elegant way to know in which iteration of for I am
I don't follow what the end objective is from the description, but to know which iteration numerically is being evaluated you've...

12 years ago | 0

Answered
how can I test for the existence of a financial time series object?
doc exist if exist('A') C=merge(A,B); else C=B end I don't have Finan Toolbox so can't test; I presume...

12 years ago | 0

Answered
Assign dotted lineto individual sets of data on a line graph
See the last example under doc plot for demo of modifying the default line style for automagic cycling. Otherwise, use ...

12 years ago | 0

Answered
gauss(x,mu,s) but my x variable is double...
>> which gauss 'gauss' not found. >> *gauss* isn't in the Matlab base product nor Stat Toolbox. If have the latter try ...

12 years ago | 0

Load more