回答済み
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年 前 | 1

| 採用済み

回答済み
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年 前 | 1

| 採用済み

回答済み
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年 前 | 2

| 採用済み

回答済み
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年 前 | 0

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

約8年 前 | 0

回答済み
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年 前 | 0

回答済み
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年 前 | 0

回答済み
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年 前 | 1

| 採用済み

回答済み
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年 前 | 0

| 採用済み

回答済み
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年 前 | 2

| 採用済み

回答済み
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年 前 | 1

| 採用済み

回答済み
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年 前 | 0

| 採用済み

回答済み
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年 前 | 0

回答済み
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年 前 | 0

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

約8年 前 | 0

回答済み
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年 前 | 0

| 採用済み

回答済み
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年 前 | 0

| 採用済み

回答済み
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年 前 | 0

回答済み
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年 前 | 0

| 採用済み

回答済み
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年 前 | 1

| 採用済み

回答済み
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年 前 | 0

| 採用済み

回答済み
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年 前 | 1

| 採用済み

回答済み
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年 前 | 0

回答済み
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年 前 | 0

| 採用済み

回答済み
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年 前 | 2

回答済み
Help with converting decimal dates in a loop
>> t=xlsread('Example.xlsx'); >> [dn,ds]=convertTN(t); >> whos t dn ds Name Size Bytes Class...

約8年 前 | 0

回答済み
Help with converting decimal dates in a loop
A = xlsread('Example.xlsx'); [fid,msg] = fopen(sprintf('Example3.txt'),'wt'); assert(fid>=0,msg) dates=A(:,5); ...

約8年 前 | 0

回答済み
Cell Array of Strings Indexing and Relabeling to Numeric Values?
This is perfect use for |categorical variable...and to use a |table| instead of cell array for the data structure. Life will be...

約8年 前 | 0

| 採用済み

回答済み
Remove cell array rows based on logical condition?
With what you've got, you're just looking for raw(I,:)=[]; to leave week weekday rows of all the data. Knowing the ac...

約8年 前 | 1

さらに読み込む