Problem with Name Value pair in fanplot

4 ビュー (過去 30 日間)
Jung
Jung 2016 年 9 月 29 日
回答済み: Anusha Sridharan 2016 年 10 月 3 日
Hi, I feel like i'm missing something basic here. I'm trying to use set the Name-Value pair in fan plot but I get a "Too many inputs error". Here is the code
historical = [ 1.0000 2.8046 ;
2.0000 4.1040 ];
forecast = [ 3.0000 28.9874 18.3958 19.6376;
4.0000 4.8933 27.2659 7.2206];
h = fanplot(historical,forecast)
Which works fine. But when I try to set any Name-value options,
h = fanplot(historical,forecast,'NumQuantiles',14)
h = fanplot(historical,forecast,'FanFaceColor',[0.4 0.4 0.4;1 1 1])
I get the "Too many inputs" error. Am I missing something obvious or am I going crazy?
  2 件のコメント
Geoff Hayes
Geoff Hayes 2016 年 9 月 29 日
Jung - do both of the above lines of code generate the same too many inputs error? Also, which version of MATLAB are you using and does it support these name and value pairs. Type
>> ver
to check the version and
>> doc fanplot
to see the documentation.
Jung
Jung 2016 年 9 月 29 日
Hi Geoff, you are right. It was a version problem. I was running into the error on the 2014b version. I was going by the documentation on the website. Gaaaaa....!

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

回答 (1 件)

Anusha Sridharan
Anusha Sridharan 2016 年 10 月 3 日
The ability to use name value pair arguments with MATLAB "fanplot" was incorporated into MATLAB R2016a and all future releases as mentioned in the link below:
From your description, it sounds like you are using a previous version of MATLAB (R2014b to be exact) which does not have the ability to use name value pairs as arguments to the "fanplot" function.

カテゴリ

Help Center および File ExchangeShifting and Sorting Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by