I want to plot soil moisture against daytime values but I am getting "Do indexing is not supported for variables of this type".
조회 수: 3 (최근 30일)
이전 댓글 표시
SM_05 = table2array(all(:,7))/100;
d = datetime(date.Var6,'Format','yyyy-MM-dd''T''HH:mm:ss''Z');
plot(d,SM_05.Var7);
The last code does not run.
댓글 수: 0
답변 (1개)
Image Analyst
2023년 1월 30일
date is a function and does not have methods, like Var6(). And SM_05 is a column vector, not a table so there is no Var7 column anymore. Var7 was part of "all" but not part of the SM_05 matrix you converted the table into. Perhaps the "all" table has a column called date in which case you'd do
SM_05 = table2array(all(:,7))/100; % SM_05 is now a double matrix, not a table.
d = datetime(all.date.Var6,'Format','yyyy-MM-dd''T''HH:mm:ss''Z');
plot(d,SM_05, 'b.-', 'LineWidth', 2);
If you have any more questions, then attach your data (the "all" matrix) and code to read it in with the paperclip icon after you read this:
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Graphics Performance에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!