Answered
How can I loop through multiple Excel files while performing math operations on each file?
See the FAQ <http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F How_can_I_process_a_sequence_of_files>. ...

11 years ago | 0

Answered
Need help with calling on a variable as input for a function
Simple enough...I wouldn't have generated the variables with such names to begin with (and you're beginning to see why)--but if ...

11 years ago | 1

| accepted

Answered
I need to look for entries in different strings
>> ~cellfun(@isempty,strfind({M1;M2;M3;M4},'1')) ans = 1 0 0 1 >> *ADDENDUM* If it's wanted a...

11 years ago | 0

Answered
Reading a text file
The first *if* is completely superfluous; it might as well be removed as the test for EOF in the while loop will terminate the l...

11 years ago | 0

| accepted

Answered
Undefined function 'm' for input arguments of type 'double
You have a reference to _m(j)_ in the subject line but there's no definition of a variable _m_ in the function nor is it in the ...

11 years ago | 1

| accepted

Answered
Feeding strings into function xcov without quotation marks
The respondents to the question at the link answered a different question than that posed -- or, more correctly, they read the q...

11 years ago | 0

| accepted

Answered
Align text in two lines with respect to a location
Use specific format string if you want a specific format... >> fprintf('%8s = %4d\n','a',2, 'bbb',641) a = 2 ...

11 years ago | 0

| accepted

Answered
How can I read many columns from xls sheet and save as vactors
"The Matlab way" is "don't do that!" To see why not and ways to accomplish your end goal in alternative ways see the FAQ at <ht...

11 years ago | 0

Answered
how to set xrange of a bar plot?
xlim([0 21]) set(gca,'xtick',[1 5:5:20]) I often will set the xlim values to some fractional value other than [0 N+1] as...

11 years ago | 0

Answered
How to plot a second axis with vectors of different length?
You don't show what you tried specifically, but there's no problem with *plotyy*; you've got one array of some number of points ...

11 years ago | 0

| accepted

Answered
how to store a matrix obtained from for loop into a larger matrix
Yours will work if you build G(i,) as a cell array by enclosing the RHS in the "curlies" {} instead of parens. Then *cell2mat* ...

11 years ago | 0

Answered
Creating a matrix after giving initial conditions
d=dir('TRMM_*_newntcl.csv'); ymdh=cell2mat(textscan([d.name], ... 'TRMM_%4d_%2d_%2d%2d_newntcl.csv', ... ...

11 years ago | 0

Answered
Accessing multidimensional array with pairwise indices
One solution; not sure if it's the fastest or not...returns an array of columns length as number of elements i the index arrays ...

11 years ago | 0

Answered
Importing dates from an Excel file using Import Data Function
I don't have past R2012b so can't test but current doc surely doesn't say anything about it...then again, not sure if earlier ve...

11 years ago | 0

Answered
MATLAB fft speed with and without padding
>> 33554432/20000000 ans = 1.6777 >> 2.514710/1.484898 ans = 1.6935 >> Seems to make sense to me. Read th...

11 years ago | 0

Answered
euclidean distance calculation for values from excel sheet
If you have the Statistics Toolbox, doc pdist

11 years ago | 0

| accepted

Answered
How can i scale certain values in a vector?
ix=x>0; % logical vector +ive loc's x(ix)=x(ix)/max(x(ix)); % normalize +ive x(~ix)=x(~i...

11 years ago | 0

Answered
Spline interpolation in matlab
Your T vector has zero-valued entries for the missing locations and so there _is_ a data value at that day and therefore *interp...

11 years ago | 1

Answered
How to obtain length of number of columns which has data
IA has the right idea but coming in from the cold doesn't know the full picture... :) As I pointed out in the discussion acco...

11 years ago | 0

Answered
Marker Location Scaling In Plot
Not without distorting the plot in linear space, not really. You can, of course, plot the values against their index which will...

11 years ago | 0

| accepted

Answered
How to Create Libraries in Matlab?
Well, Matlab is what Matlab is, and separate m-files are the way functions are implemented in Matlab. So, the simple answer is ...

11 years ago | 1

Answered
Use of fopen in for loop
See the FAQ <http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F <How_can_I_process_a_sequence_of_files?>...

11 years ago | 0

Answered
Script for CSV processing
s=csvread('yourfile.csv'); % read the signal ix=find([0 diff(s>0)==1,25); % locate first 25 zero crossings The above w...

11 years ago | 0

Answered
How can I use fprintf to display a message in a text box in a GUIDE GUI?
See doc fprintf for the "why". What does it say *fprintf* returns if there is an output variable given? (HINT: it isn...

11 years ago | 0

Answered
Matrices HELP for Air Pollution Modelling!!!
It is simply a superposition of the three with an origin translation. IOW, just create a grid for the full site and create a pl...

11 years ago | 0

Answered
Error using "csvread" in for loop
Matlab is _NOT_ C... for i = 0:899 { csvwrite('num.csv', csvread(filename(i, 0, [i 0 i 4])) ... } The "cu...

11 years ago | 0

Answered
how to solve tan(x)-x=0.4267?
Start with doc fsolve

11 years ago | 0

Answered
Can't make this for loop work...
_"...this loop through so that I get a J1, J2, J3, and J4 matrix"_ *Don't do that!* See the FAQ for why not and "more better...

11 years ago | 2

Answered
How to plot three data sets for a given input in graph
Undoubtedly, look at doc hold for setting hold on to add to an existing plot.

11 years ago | 0

Load more