Akzeptierte Antwort

Walter Roberson
Walter Roberson am 11 Jun. 2024

1 Stimme

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)

Weitere Antworten (0)

Kategorien

Mehr zu Language Fundamentals finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2024a

Tags

Gefragt:

am 11 Jun. 2024

Kommentiert:

am 12 Jun. 2024

Community Treasure Hunt

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

Start Hunting!

Translated by