回答済み
How to plot different length of vectors?
for k=1:3000 xvalue1(k)=k; end MATLAB is MATrix LABoratory -- use vector facilities... xvalue1=1:3000; figure; d5=X_...

7年以上 前 | 0

回答済み
Why is str2num returning [] and str2double returning NaN?
X = str2double('newStr1') Y = str2doule('newStr2') You're trying to turn the literal character arrays 'newStr1' and 'newStr2' ...

7年以上 前 | 1

| 採用済み

回答済み
Cut Out Data for Analysis
x=x(any(x,2),:);

7年以上 前 | 0

| 採用済み

回答済み
Help with Global Variables
But you define and set D=0 in the function as a local variable inside the function modeleth so nothing outside prior to that mat...

7年以上 前 | 0

回答済み
How I can substract vectors with different length?
I presume you mean to standardize the monthly data by year...presuming you have a date variable along with the observation, then...

7年以上 前 | 0

| 採用済み

回答済み
Access to array of structs (no for loops)
Is expressly noted that ML does NOT support array indexing for more than a single struct array element expression--see Note @ ht...

7年以上 前 | 0

回答済み
Whiskers in Boxplot seems incorrect
Read the description of 'whisker' carefully...particularly the very last sentence below (emphasis mine): "boxplot draws points ...

7年以上 前 | 1

| 採用済み

回答済み
Compare matrix element without loops
Not w/o zero loops, think not, but can reduce to one... idx=1:nG; % working index array for element logical lookup/e...

7年以上 前 | 2

| 採用済み

回答済み
Interpolate data with 2 variables
Your data are pretty sparse over the 2D space but you can try F=scatteredInterpolant(S,T,F); f=F(s,t); where S,T,F are your d...

7年以上 前 | 0

| 採用済み

回答済み
present decimal values in a pie graph
... for i = 1 ; length(num) % ";" should be ":" num(i) = ((num(i)/sum(num))*100); end Use Matlab array syntax ...

7年以上 前 | 1

| 採用済み

回答済み
Multiple Curve intersection plot
Actually, after looking at the drawings some more, I realize you did supply enough originally to make an initial pass at it... ...

7年以上 前 | 0

回答済み
Convert datetime that's not in Matlab format to a matlab format datetime
TZ offsets are recognized in ML datetime -- your string can be converted as: s='2014-12-13T18:45:00+00:00'; >> datetime(s,'Inp...

7年以上 前 | 1

| 採用済み

回答済み
horizontal concatenate a datetime structure to a table array
I can't tell which data it is you're trying to piece together, but from the OrginalData.mat you posted in the previous Q? on dat...

7年以上 前 | 1

| 採用済み

回答済み
remove table header row
Should show your work when you've tried something that seems like should but doesn't...it's really quite a straightforward task-...

7年以上 前 | 2

| 採用済み

回答済み
date and time format change
>> tst=GBP_USD.Date(1:10); % just a sample set to play with >> datetime(tst,'InputFormat','yyyy-MM-dd''T''HH:mm:ss.SSSS...

7年以上 前 | 1

| 採用済み

回答済み
Conversion of Categorical to double
To answer the question posed, Data.Column7=double(Data.Column7); but see the comment above -- the better solution would be to...

7年以上 前 | 1

回答済み
Conversion of Categorical to double
y1 is a grouping variable of which bin each refers to; it will be in the range of 1:N where N is number of unique categories in ...

7年以上 前 | 1

| 採用済み

回答済み
how to compare two arrays
O=zeros(size(A)); for i=1:size(A,2) O(:,i)=interp1(B(:,i),B(:,i),A(:,i),'next','extrap'); end

7年以上 前 | 0

| 採用済み

回答済み
Sorting a mixed text-numeric matrix (cell array) by one of its (numeric) columns
t=readtable(fileName,'readvariablenames',1); t.sort=rand(height(t),1); [~,ix]=sort(t.sort); t=t(ix,:);

7年以上 前 | 1

| 採用済み

回答済み
How to find common calendar of three matrices?
ABC=[A;B;C]; d=datetime(ABC(:,1:3)); g=findgroups(d); D=splitapply(@(x) {vertcat(x)},ABC,g); D=cell2mat(D(cellfun(@(c)size(c...

7年以上 前 | 0

| 採用済み

回答済み
how to find a non affected rank in a vector column
Probably for such a case as written for j=1:4 try set(h_leg(j),fontsize,12); catch end end will solve the probl...

7年以上 前 | 1

| 採用済み

回答済み
How to stop on a variable getting a specific value?
dbstop in file at if expression is best you can do I think...you don't have to manually insert the breakpoint at every line but...

7年以上 前 | 0

| 採用済み

回答済み
Why does matlab allow array indexing by a string by converting them into ascii codes?
Why? Because it retains consistency across data types of char() being simply an array of byes. Indexing by alphabetical inde...

7年以上 前 | 1

回答済み
uigetfile for multiple type problem
Gotta' have good eyes in reading the documentation...use uigetfile({'abc*.mat';'*.dat'}) instead--a column instead of row vect...

7年以上 前 | 0

| 採用済み

回答済み
How to concatenate k vectors together without knowing the value of k ?
"... I have to do all these operations in one line in the max function" Well, no, not really -- that's a restriction you've pla...

7年以上 前 | 1

回答済み
How to add x-axis in the bottom or in the top of a figure?
Indeed, why after 30 years TMW hasn't built parallel universe for it is simply incomprehensible, I agree. It isn't all that ha...

7年以上 前 | 2

| 採用済み

回答済み
How can i determine last infection point of a vector?
For the type of figure as shown, simple difference will work... >> d=[0 diff(A)]; >> A(d>4) ans = 173 >> where the '4'...

7年以上 前 | 1

| 採用済み

回答済み
i need to delete a zero from a single row 10 column vector
As we've covered the other cases pretty thoroughly... For the specific input vector OP showed where it is almost certain it is ...

7年以上 前 | 0

回答済み
fplot command what is the default resolution ?
clear x f=@(x) 3*exp(-x).*sin(x); fplot(f,[0 8],'b') will produce the same plot -- fplot doesn't use your x array at all; it ...

7年以上 前 | 0

回答済み
How to fix the ticklabels - time series analysis?
Clearly, the ticklabels you wrote are (1:5000)/20. The first label is 0.05 --> 1/20, the second 0.10 --> 2/20, etc., etc., ......

7年以上 前 | 1

| 採用済み

さらに読み込む