HOW CAN I PLOT THIS?
이전 댓글 표시
Hello, I'm not able to plot this even if I converted the data I need in table.
Could anyone kindly help me please?
Thank you!
clear all
close all
load('GIULIA_MMEQ1.mat');
A=table2array(GIULIAMMEQ1(:,2));
B=str2double(A);
giulia_MM_EQ_NEW= B * 0.35 * 10;
C=array2table(GIULIAMMEQ1);
stackedplot(GIULIAMMEQ1.Dec1997,C)
채택된 답변
추가 답변 (2개)
David Hill
2021년 7월 1일
load('EXAMPLE.mat');
m=table2array(GIULIAMMEQ1);
d=datenum(m(:,1));
v=str2double(m(:,2));
idx=~isnan(v);
plot(d(idx),v(idx));
댓글 수: 6
David Hill
2021년 7월 1일
Converted time string to datenum value for easy plotting.
load('EXAMPLE.mat');
m=table2array(GIULIAMMEQ1);
d=datenum(m(:,1));
v=3.5*str2double(m(:,2));%figured you could figure out where you wanted to multiply
idx=~isnan(v);
plot(d(idx),v(idx));
Pul
2021년 7월 1일
David Hill
2021년 7월 1일
편집: David Hill
2021년 7월 1일
look at datenum()
load('EXAMPLE.mat');
m=table2array(GIULIAMMEQ1);
d=datenum(m(:,1));
v=3.5*str2double(m(:,2));%figured you could figure out where you wanted to multiply
idx=~isnan(v);
plot(d(idx)-730088,v(idx));%substract the first date to get days on horizontal
Amit Bhowmick
2021년 7월 2일
Use stackedplot instead of plot for the correction on x axis leveling
Pul
2021년 7월 2일
Pul
2021년 7월 2일
0 개 추천
댓글 수: 4
Amit Bhowmick
2021년 7월 2일
use the .mat file which you have attached in this thread
Pul
2021년 7월 2일
Amit Bhowmick
2021년 7월 3일
T=table(C,NEW,'Variablenames',{'Year' 'Value'}); %Put label
stackedplot(T,'XVariable','Year') %
Pul
2021년 7월 3일
카테고리
도움말 센터 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!






