yline don´t work "Undefined function or variable 'yline'." Even when using MATLAB example code.

Hi!
Just as the title decribes. I have updated MATLAB recently. I still get this error massage "Undefined function or variable 'yline'.". Even if I open a new script and only type
yline(2.5);
What is wrong? Do anyone else have the same issue?
Cheers
NOTE: If i use "MATLAB Online" it works just fine. Even if I copy and paste my script and run it there.

1 件のコメント

Sriram Tadavarty
Sriram Tadavarty 2020 年 4 月 25 日
May i know the version of MATLAB you are using. You can know this with ver command.
If the MATLAB version you are using is not later than R2018b, the function would not work. MATLAB online works on latest MATLAB version.
If the MATLAB version is later than R2018b, try to clear all the variables in your workspace and try to perform it again.
Hope this helps.

サインインしてコメントする。

 採用された回答

Steven Lord
Steven Lord 2020 年 4 月 25 日

0 投票

As stated at the end of the documentation page for the yline function, that function was introduced in release R2018b. You will not be able to use it in earlier releases.

1 件のコメント

Walter Roberson
Walter Roberson 2020 年 4 月 25 日
it's scary, how many functions I have accidentally memorized the introduction date for...

サインインしてコメントする。

その他の回答 (1 件)

Jonas Sandström
Jonas Sandström 2020 年 4 月 27 日

0 投票

Did an update to Matlab R2020a and now it works, thanks for all the help guys!

カテゴリ

ヘルプ センター および File ExchangePerformance and Memory についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by