MATLAB throwing Parse error when I attempt to display matrices?

1 回表示 (過去 30 日間)
Owen Zupan
Owen Zupan 2018 年 9 月 14 日
回答済み: KSSV 2018 年 9 月 14 日
This problem has occurred several times, and I am yet to find a fix. When i create a matrix, then attempt to display it, the central value runs a red line under it and is described as a parse error. ex:
a = 2:3:8
disp(a)
2 5 8
In this example, the 5 displays with a red line under it, and is described as a Parse error. Any solutions to this?
Note: I am a complete novice at MATLAB, and coding in general.

回答 (1 件)

KSSV
KSSV 2018 年 9 月 14 日
where you tried to use disp ? This should not throw any error..unless you copy 2 5 8 into your m file. If you want to copy it in m file use:
a = [2 5 8] ;

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by