I want to plot soil moisture against daytime values but I am getting "Do indexing is not supported for variables of this type".

3 visualizaciones (últimos 30 días)
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.

Respuestas (1)

Image Analyst
Image Analyst el 30 de En. de 2023
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:

Categorías

Más información sobre Graphics Performance en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by