Answered
How to use xlsread with a variable cell instead of a constant cell?
... [d,e]=xlsread('Excelbasededatos.xlsx','Hoja1','H3') g=xlsread('Prestamos','Hoja1',[d,e]) In the *xlsread* retu...

11 years ago | 0

Answered
Plotting multi-component signals
You've plotted all of them against the same time vector instead of concatenating them; hence they're all overlaying each other. ...

11 years ago | 1

Answered
How to calculate within group sum of squares for kmeans ?
Have to run *kmeans* over the range of number of clusters saving the optional _sumd_ (third) output parameter for each case. Th...

11 years ago | 0

| accepted

Answered
Fit a polynomial function
There are several regression and curve fitting routines if you have the Statistics and/or Curve Fitting toolboxes; if you don't ...

11 years ago | 0

Answered
problem in reading datetime
The file wasn't opened successfully as the error says...use the alternate return to find out additional information on why... ...

11 years ago | 0

Answered
How can I combine two text files having different columns in one file?
c=[textread('a.txt') textread('b.txt')];

11 years ago | 1

Answered
MEX compilation with external libraries errors - .lib needed?
Haven't ever used it myself, but... The web site installation says... _"MPIR has an autoconf/automake/libtool based con gu...

11 years ago | 0

Answered
How do I extract sections of data from a csv file?
d=[]; % initialize an array for the data fmt=repmat('%f',1,14); % format string to match file fid=fopen('filename'); ...

11 years ago | 0

| accepted

Answered
How to import Excel data from a spreadsheet with cross-file references?
Use the COM or .NET Framework would be only thing I'd see. Somehow Excel will have to be told what to do (altho I guess you cou...

11 years ago | 0

Answered
how to compare a line a of matrix with another ?
>> if size(unique(matrix(:,1:2),'rows'),1)<size(matrix,1) disp('Is at least one match') else disp('All u...

11 years ago | 0

| accepted

Answered
How to position flexibly the start of a for cycle?
There is no absolutely general answer to such a question; only a specific solution to the specific condition. In this case it's...

11 years ago | 0

Answered
Current time - datetime and datenum
>> help now now Current date and time as date number. ... FLOOR(now) is the current date and REM(now,1) is the ...

11 years ago | 2

| accepted

Answered
defining sample interval from Julian time
AFAICT there is no TMW-supplied function *gregorian* so can't speak of what that might have done regarding conversion of whateve...

11 years ago | 0

| accepted

Answered
Can we add a statement in between the codes?
Nyet, no such syntax exists. About the closest you can get is something like r = a - ... % this is a constant b;...

11 years ago | 1

| accepted

Answered
create scripts for data sequentially
W/o other specifics, looks like the FAQ <http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F How_can_I_pro...

11 years ago | 0

Answered
how to delete repeated coordinates
Presuming values are significant but order isn't, simplest that comes to mind is >> unique(sort(d,2),'rows') ans = 3...

11 years ago | 0

Answered
Removing certain lines of text from an ASCII file loaded into MATLAB
dat=textread('gillis.txt','%s','delimiter','\n','whitespace',''); % load in cell array one element per line dat=dat(cellfu...

11 years ago | 0

| accepted

Answered
Sorting Rows in a Matrix by Column Containing Largest Value
>> [~,imax]=max(A,[],2); >> [~,idx]=sort(imax); >> A(idx,:) ans = 24 22 20 18 16 4 10 6 ...

11 years ago | 1

Answered
can u pls explain it
_% normalizes to the range (0,1)._ Excepting that it doesn't if mean(imOut(:))<0. In that case it adjusts by the average, bu...

11 years ago | 0

Answered
How do I store a 32x4000 matrix onto a .txt file?
"Simplest" is in eye of the beholder, perhaps...but there are a number of choices, none of which are all _that_ complicated depe...

11 years ago | 0

Answered
How can I split a matrix of varying size (depending on data input) into new matrices of 3 columns each?
Sometimes a loop is just as easy as anything else... i1=1; for ix=size(xyz,2)/3 % for groups of three m=xzy(:,i1:i1...

11 years ago | 0

| accepted

Answered
Is there a "regress" function in Matlab R2014a?
Yes, but it is in the Statistics Toolbox, _not_ base Matlab. You can build a general model and use the backlash operator "\" ...

11 years ago | 0

| accepted

Answered
Is it possible to control the gap in dashed line style?
No, per the doc there are the three (other than '-' and 'none') linestyle choices which, being one of the specific list of allow...

11 years ago | 1

Answered
How do I group a sample data by a column into small groups?
>> edges=[-inf 1 10:10:40 inf]; % set up bin edges >> [n,bin]=histc(dat(:,2),edges) % count, bin... >> for i=unique(bi...

11 years ago | 0

| accepted

Answered
linking m-files togeher
You don't actually "link" m-files together, you create a script (or another function) that calls the two successively. Or, if t...

11 years ago | 0

Answered
for loop or while loop?
# Don't need _syms_ unless you were to try to solve for a symbolic solution; to find a numeric solution it isn't of any use # T...

11 years ago | 0

| accepted

Answered
How do I find the time between when the animal_speed exceeded the threshold till when it dipped below the threshold (all instances when this happened)?
That's certainly an erratic animal!!! :) Anyway, this is the same question rephrased in slightly different terms just yester...

11 years ago | 0

Answered
Error using reshape, To RESHAPE the number of elements must not change?
Well, since 13 is prime, you're stuck, there is no factor of 13 other than 1 and itself. By symmetry to the initial, it looks...

11 years ago | 3

| accepted

Answered
How to read and save multiple excel sheets in Matlab?
doc xlsread Use the optional _SHEET_ name to read more than the default first sheet.

11 years ago | 1

Load more