I am practicing matlab and this is a simple code:
x = 0:20:120; y = [2.5:3.8:4.5:4.8:4.9:5.0:5.0]; plot(x,y)
I am getting a parse error incorrect usage at y, why?

답변 (1개)

Tamfor Dulin
Tamfor Dulin 2015년 8월 21일

0 개 추천

Use comma (,) instead of colons (:)
like so
x = 0:20:120; y = [2.5,3.8,4.5,4.8,4.9,5.0,5.0]; plot(x,y)

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

태그

질문:

2015년 8월 21일

답변:

2015년 8월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by