回答済み
Error when fitting polyfit curve
Error is exactly what it says--you wrote: X = categorical({'March','April','May','June','July','August','November'}); M = reor...

5年以上 前 | 0

| 採用済み

回答済み
Export a Char String to Excel
The example doesn't work as is, exactly... >> res = ['Carreau-Parameter: ';'a = 7521.1446 Pa*s ';'b = 0.10637 s ';'c = 0.7...

5年以上 前 | 1

| 採用済み

回答済み
How to convert a vector to a string (Matlab2016a)
For what definition of "string"? >> A=1:3; >> num2str(A) ans = '1 2 3' >> num2str(A.') ans = 3×1 char array ...

5年以上 前 | 0

回答済み
Continue Long Statements on Multiple Lines
ix=find(~contains(txt,'Sys')); >> arrayfun(@(ix) join(txt(ix-1:ix),1),ix) ans = 2×1 cell array {'Sys_7899 1=0.21 2=...

5年以上 前 | 0

回答済み
Mean of mutiple variables
d=dir('data*.mat'); % or similar list. Name files so can use appropriate wildcard expression total=0; for i=1:numel(d) ...

5年以上 前 | 1

| 採用済み

回答済み
How to use fillmissing function within a group ?
>> varfun(@(x) fillmissing(x,'previous'),T,'groupingvariables',{'ID'},'InputVariables',{'amount1','amount2'}) ans = 6×4 tabl...

5年以上 前 | 0

| 採用済み

回答済み
Index exceeds the number of array elements (Very odd case)
Well, yes, that can happen but it won't necessarily always, depending upon what the data are in the two arrays. ... [SOCu, ind...

5年以上 前 | 1

回答済み
Plot 2 vectors (different size) on same histogram normalized such that both have total area 1
Use 'Normalization','pdf' instead.

5年以上 前 | 1

| 採用済み

回答済み
How to find X value of given Y close to zero ?
[~,ix]=min(abs(m),[],'all','linear'); [~,j]=ind2sub(size(m),ix); >> o(j) ans = 340 >>

5年以上 前 | 0

| 採用済み

回答済み
export txt with text and numers
Does seem as though TMW has ignored such in terms of prepared functions; probably because there is no limit to the possibliliti...

5年以上 前 | 0

回答済み
How to add values in matrix if in a conditions is met?
>> accumarray(findgroups(data(:,1)),data(:,2)) ans = 3.5000 1.5000 4.8000 2.5000 5.4000 2.8000 ...

5年以上 前 | 0

| 採用済み

回答済み
How to create extra data based on a string cell value?
Read the data into a table instead is probably quite a lot easier. Then use grouping variables to operate over data by whatever...

5年以上 前 | 0

回答済み
readMatrix/for loop issue
MATLAB is case sensitive--the function is readmatrix, not readMatrix

5年以上 前 | 0

回答済み
How do I use use sprtintf for a loop?
Probably the most-asked question of all...don't build the names, use dir d=dir('Monday*.csv'); % better to use fully-qual...

5年以上 前 | 0

回答済み
How can I exclude specific data points from a data file?
Just select the data want (or conversely, remove what don't want)... Fout=1000; ZLim=2.5E6; isOut=(rawData(:,1)==Fout) & (raw...

5年以上 前 | 0

回答済み
Difference between two successive elements in a matrix
D=diff(A(:,2)); ix=find(D>5)+1;

5年以上 前 | 1

回答済み
How to plot two lines with different scales in MATLAB?
So what, specifically did you try and what didn't work? Seems straightforward... t=readtable('t.csv'); plot(t.Date,t.IP) yla...

5年以上 前 | 0

| 採用済み

回答済み
How to find is between values for 1min datetime delta
>> tlower.Format='Default'; >> tupper.Format='Default'; >> [tlower tupper] ans = 1×2 datetime array 01-Jan-2020 15:18...

5年以上 前 | 0

| 採用済み

回答済み
histogram with three sets of data
So what have you tried? Did you read the doc for bar and look at examples? XData=categorical({'Category A','Category B','Categ...

5年以上 前 | 0

| 採用済み

回答済み
getting info from a unique ID in a csv
Power of the MATLAB table comes fore... tElev=readtable('elevatorexample.csv'); FindFloor=2; % the f...

5年以上 前 | 0

| 採用済み

回答済み
why wont text scan read all rows?
MPG Cylinders displacement horsepower weight acceleration model year origin car name 18 8 307 130 3504 12 70 1 chevrolet chevel...

5年以上 前 | 0

回答済み
matlab Fit the third polynominal
I'm guessing something on the lines of the following would be about the ticket... nProp=listdlg('ListString',{'Ultimate strengt...

5年以上 前 | 0

回答済み
How to extract data from one column using the data from the two other columns
res=B(ismember(A,C));

5年以上 前 | 0

回答済み
Obtain seperate legend for each contour line
There's no way to make legend use the contour lines directly; there are not any object handles to them; and the legend is global...

5年以上 前 | 0

| 採用済み

回答済み
Import a CSV file with no header separating numbers from symbols in a table
Gotta' give it a little help...but boy! that's ugleee! :( At least they did use quoted strings. opt=detectImportOptions('Miche...

5年以上 前 | 0

回答済み
How to add a newline after a certain number of characters
function strMultiLines=nCharLine(strtxt, n) fmt=[repmat('%c',1,n) '\n']; strMultiLines=sprintf(fmt,strtxt); end for inpu...

5年以上 前 | 1

回答済み
How to average over different length vectors without excessive for loops?
Use a cellarray to store the results of each trial instead of individual named variables; then means=cellfun(@mean,x);

5年以上 前 | 0

回答済み
how to find index of matrix
Try [row,col]=find (A(:,1)==9 && A(:,3)=5.125) You've got the column indices off -- If you really mean for it to be for A(:,2...

5年以上 前 | 0

回答済み
How can I count the number of times a specific year appears given an x amount of dates
tEQ=readtable('database.csv'); uYr=unique(year(tEQ.Date)); nEq=histc(year(tEQ.Date),uYr); tNEQ=table(uYr,nEq,'VariableNames',...

5年以上 前 | 0

回答済み
How to print some numeric value by using xlabel in subplot?
xlabel(num2str(NC,'NC=%.2f')) Dunno what "attack" above represents. If it's a char variable and wanted as part of the string, ...

5年以上 前 | 0

さらに読み込む