How to fix this LineWidth error?

For some reason i get an error when trying to increase the width of my plotline. The code is:
fplot(Cpsys,[min(x(:)) max(x(:))],'LineWidth',3)
It gives me the error "Error in color/linetype argument."
For extra info: whos Cpsys gives: Name = Cpsys, Size = 1x1, Bytes = 16, Class = function_handle
I'm using version R2015b.
Any idea how to fix this? i've seen you can change the default settings to avoid problems like this, but i really only want this line to be thicker.

 採用された回答

Jan
Jan 2016 年 11 月 3 日
編集済み: Jan 2016 年 11 月 3 日

0 投票

The older fplot implementation did not allow to specify name-value pairs. Try:
[x,y] = fplot(Cpsys, [min(x(:)) max(x(:))])
plot(x, y, 'LineWidth', 3);

1 件のコメント

Rick
Rick 2016 年 11 月 3 日
Awesome, thanks!

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeLine Plots についてさらに検索

質問済み:

2016 年 11 月 3 日

コメント済み:

2016 年 11 月 3 日

Community Treasure Hunt

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

Start Hunting!

Translated by