Answered
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...

8 years ago | 1

Answered
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 (...

8 years ago | 0

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

8 years ago | 0

| accepted

Answered
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...

8 years ago | 1

| accepted

Answered
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...

8 years ago | 1

| accepted

Answered
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...

8 years ago | 2

| accepted

Answered
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); ...

8 years ago | 0

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

8 years ago | 0

Answered
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 ...

8 years ago | 0

Answered
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 ...

8 years ago | 0

Answered
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...

8 years ago | 1

| accepted

Answered
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 ...

8 years ago | 0

| accepted

Answered
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')...

8 years ago | 2

| accepted

Answered
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...

8 years ago | 1

| accepted

Answered
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...

8 years ago | 0

| accepted

Answered
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");...

8 years ago | 0

Answered
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...

8 years ago | 0

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

8 years ago | 0

Answered
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); ...

8 years ago | 0

| accepted

Answered
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...

8 years ago | 0

| accepted

Answered
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-...

8 years ago | 0

Answered
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...

8 years ago | 0

| accepted

Answered
Weird .csv file plot problem
The first syntax per the documentation plots all columns of _K_ versus ordinal number You're on the right track with the seco...

8 years ago | 1

| accepted

Answered
Find NaN values in cell array that stores changing types of elements over time
I'd still fix it there...the very last thing in the function function [costs,paths] = dijkstra(AorV,xyCorE,SID,FID,showWait...

8 years ago | 0

| accepted

Answered
Replace specific values in one column with value from the same row of another column
Pretty simple, yes...first rebuild the table as described... s=["NaN" "" "" "NaN" "D" "NaN" "NaN" "E"].'; c=categorical(...

8 years ago | 1

| accepted

Answered
Open multiple text files remove all rows with number less than -65.0 in the first column
A reasonable start with a few "issues"... First, by just using |dir| you'll get the null directory entries as well as files, ...

8 years ago | 0

Answered
How to call a value from a file within an equation?
Define anonymous function-- fnAggRF=@(n)(-1.3e-6.*(('CH4(n)'-'CH4(0'))/2)-8.2e-6*n+.043)*(sqrt(CH4(n)-sqrt(CH4(0)))); Th...

8 years ago | 0

| accepted

Answered
how to read sequence of files that are seemingly random
d=dir(fullfile('YourBaseDirectory','myPos_*.mat'); for i=1:length(d) load d((i).name ... % Do what ever need...

8 years ago | 2

Load more