Respondida
how to let elements in each column of a matrix divided by the first element in each column
x=x./x(1,:); uses recent automagic(*) singleton expansion, if you have earlier release that errors on size mismatch then us...

más de 8 años hace | 0

Respondida
Using retime command for daily minimum when there are two variables
With appropriate acknowledgement to Sean, a slight rearrangement is a little less verbose in use...with the previous TD table of...

más de 8 años hace | 1

Respondida
How to collect datetime from text entry and use in plot?
_Almost_ there...you're trying to convert the string containing the date vector representation, but |datetime| doesn't know that...

más de 8 años hace | 1

| aceptada

Respondida
Plotting scatter plot in a FOR loop with different colors
clrs=['r','g','b','c','m','y','k']; for i=1:N ... scatter(y,z,sz,c(i),'filled') ... end for the define...

más de 8 años hace | 0

| aceptada

Respondida
Datetime format using tabularTextDatastore
Looks like you set the _'SelectedFormats'_ property to match the variables. TabularTextDatastore Properties ... Sel...

más de 8 años hace | 1

| aceptada

Respondida
Efficiently processing unusual date/time format
Once you have the cell array that holds the date strings, then |datetime| _will_ convert from day of year... >> datetime(r,...

más de 8 años hace | 1

| aceptada

Respondida
How to generate sequenced file names with file extensions?
On the same line... >> ext='.jpg'; >> fn=num2str([1:4].',['pcimage%04d' ext]) fn = 4×15 char array 'pcimage00...

más de 8 años hace | 1

Respondida
How can i make one table with other tables(one line and much columns) in vertically?
[y0, fs] = wavread('eugeniasam1'); %file .wav [y1_1, fs] = wavread('speaker1 (6)'); [y1_2, fs] = wavread('speaker1 (...

más de 8 años hace | 0

Respondida
Sorting and averaging Data
Are the position data points exact duplicates? If so, [g,tGPS]=findgroups(t.GPS_LONG,t.GPS_LAT); % groups table ...

más de 8 años hace | 0

| aceptada

Respondida
how can we estimate memory requirements for nchoosek?
>> help nchoosek nchoosek Binomial coefficient or all combinations. ... nchoosek(V,K) where V is a vector of length...

más de 8 años hace | 1

| aceptada

Respondida
is there an alternative to nchoosek which is too slow?
Well, you're asking for 40!/(10! 30!) elements --> >> N=prod(31:40)/factorial(10) N = 847660528 >> elements so it...

más de 8 años hace | 1

| aceptada

Respondida
How can I save cell array with columns of different lengths into a text file(all numeric data)
The simpler augmentation route looks something like-- l=cellfun(@length,c); % return length of each cell i...

más de 8 años hace | 2

| aceptada

Respondida
How to iterate through rows in excel spreadsheet and sum specific data from there?
m=readtable('milli.dat'); [g,County]=findgroups(m.COUNTY); sums=splitapply(@(x,y) sum([x y]),m.Work,m.Shift,g); ...

más de 8 años hace | 0

Respondida
Scan a text file with empty ele in line
>> t=readtable('reza.txt','TreatAsEmpty','{}') ans = 2×10 table Var1 Var2 Var3 Var4 ...

más de 8 años hace | 0

Respondida
How to plot multiple lines using error bar, AND plot them with legends
Syntax error in the LaTeX strings...it doesn't like the cellstr inputs; use straight character strings if separate elements are ...

más de 8 años hace | 0

Respondida
How to average this excel data, so that it retains all data but reduces in length?
If you have Signal Processing TB, use doc resample Simple interpolation can be accomplished by |interp1| or if you turn ...

más de 8 años hace | 0

Respondida
how to create pairwise label matrix ?
One possible solution-- >> class=categorical({'A','B','A','B'}); >> nk=nchoosek(1:4,2); >> arrayfun(@(ix1,ix2) isequal(cl...

más de 8 años hace | 1

| aceptada

Respondida
Extraction of subrows of different length
One solution >> arrayfun(@(i1,i2,i) all(A(i,i1:i2)),iStart,iEnd,[1:size(A,1)]) ans = 1×4 logical array 1 0 1 ...

más de 8 años hace | 0

| aceptada

Respondida
Fill below function fplot
Madan's comment amplified... fnF=@(x) betapdf(x,a_beta,b_beta); figure fplot(@(x) betapdf(x,a_beta,b_beta),[0 1],'b')...

más de 8 años hace | 2

| aceptada

Respondida
How to set a parameter of poly2 fit to a specific value during fit process?
You have to define the model...for something this simple the anonymous function route is the simplest... fnPolySq = @(p1,p2...

más de 8 años hace | 1

| aceptada

Respondida
How to use datetime to plot a range of dates
OK, since this is so much altered from the first Q? that I _thought_ was being asked, I'll just make it a second entirely indepe...

más de 8 años hace | 0

| aceptada

Respondida
How to use datetime to plot a range of dates
Try this as outline to retrieve the files desired between two dates... D1=datetime("3/15/2017"); D2=datetime("3/16/2017");...

más de 8 años hace | 0

Respondida
Plot data in loop with num2str
Several things...the specific error is trying to plot() a string; ML will _not_ do character substitution like that. The more...

más de 8 años hace | 0

Respondida
How to make figure 2 to be plot ?
... figure2=figure; % create figure, save handle ... ... % much later on... figure(figure2) % make figure w/ ...

más de 8 años hace | 0

Respondida
How can I convert one date and time from two colums?
Another perturbation of Star's approach... filename = 'tidal_data_jtide.txt'; TD = readtable(filename); ...

más de 8 años hace | 0

| aceptada

Respondida
How can I write data to excel sheet in the next column automatically when my program runs for the 2nd time, 3rd time and so on while still having the previous runtime computations saved in previous columns of excel file
Amplifying on madhan ravi's comment... function []=storecalculate(a,b,c,d,excelfile,location) ... xlswrite(...

más de 8 años hace | 1

Respondida
How can i add a main line and main column for my table?
Given _c_ is a cell array of your initial data, then t=cell2table(c,'VariableNames',{'Line1','Line2'},'RowNames',cellstr(nu...

más de 8 años hace | 0

| aceptada

Respondida
How to multiple read csv and subject it to formula and look then store in matrix mat for plotting.
Many Q? here on the same general idea...here's one recent one that should be good outline to follow/modify to specific purposes-...

más de 8 años hace | 0

Respondida
How would I make this plot look nicer?
You might try surf(X, Y, real(Z),'FaceColor','interp','EdgeColor','none'); ylim([0 2]) for starters...

más de 8 años hace | 0

| aceptada

Cargar más