Why I can't plot x = years , y = GDP
    3 ビュー (過去 30 日間)
  
       古いコメントを表示
    

0 件のコメント
採用された回答
  Walter Roberson
      
      
 2024 年 6 月 11 日
        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)
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!