フィルターのクリア

fplot() runs Documentation Example with errors

1 回表示 (過去 30 日間)
Aaron Drews
Aaron Drews 2016 年 10 月 18 日
回答済み: Soma Ardhanareeswaran 2016 年 10 月 21 日
The following code taken from the MATLAB documentation for the fplot() function results in an error when executed on R2016b on Win7 (both 64 bit):
>> fplot(@(x) sin(x))
Error using box/set.length (line 19)
box.length must be a number.
Error in box (line 11)
box_obj.length = length;
Error in fplot (line 156)
box(cax,'on');
end
The plot seems to be ok but the error is worrisome and I've not found any documentation of bugs or comments related to this in MATLAB central. Can anyone else verify or suggest a solution?

採用された回答

Soma Ardhanareeswaran
Soma Ardhanareeswaran 2016 年 10 月 21 日
Looks like you have a custom file called 'box.m' that is masking the original 'box.m' provided by MATLAB.
Run the following command to verify if there are multiple files with the same name:
which -all box
Remove the custom file or rename is and observe if the error persists.

その他の回答 (0 件)

カテゴリ

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by