Effacer les filtres
Effacer les filtres

Why I can't plot x = years , y = GDP

1 vue (au cours des 30 derniers jours)
Ghazi
Ghazi le 11 Juin 2024
Commenté : Ghazi le 12 Juin 2024

Réponse acceptée

Walter Roberson
Walter Roberson le 11 Juin 2024
GDP.("YEARS")
retrieves the field Years from the GDP object, and displays the result (because you have no semi-colon on the line)
x=("YEARS")
assigns the string "YEARS" to x. This has nothing to do with GDP.("YEARS")
Perhaps you want
x = GDP.("YEARS");
y = GDP.("GDP");
plot(x, y)
  1 commentaire
Ghazi
Ghazi le 12 Juin 2024
thank you bro

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Line Plots dans Help Center et File Exchange

Tags

Produits


Version

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by