Why does arrow fail? (R2015a)

3 次查看(过去 30 天)
Eric
Eric 2015-7-22
编辑: Eric 2015-7-22
A simple call to arrow fails on 2015a with:
Undefined operator '*' for input arguments of type 'matlab.graphics.axis.Axes'.
Error in arrow (line 423)
ax = o * gca;
Where on line 412: o = ones(narrows,1);
  1 个评论
Star Strider
Star Strider 2015-7-22
I assume you’re not using the annotation 'arrow' function.
If arrow is a FEX submission, note that HG2 ‘broke’ many FEX files that used the more flexible HG1 functionality. If they are not updated to be compatible with HG2 (and I suspect many cannot be), you have to use them with R2014a or earlier.

请先登录,再进行评论。

采纳的回答

Mike Garrity
Mike Garrity 2015-7-22
I'm not sure what "arrow" is, but that code fragment looks like it's trying to create a vector which holds "narrows" copies of the handle of the current axes. A much more reliable way of doing that would be something like:
ax = repmat(gca,[narrows 1])

更多回答(1 个)

Eric
Eric 2015-7-22
编辑:Eric 2015-7-22
Thanks! My bad...I thought arrow() was a part of MATLAB distribution. Rather, it's from the MATLAB File Exchange: http://www.mathworks.com/matlabcentral/fileexchange/278-arrow-m ... which explains why it broke ;-)
Based on the comments provided there, I was able to make the necessary modifications to arrow.m so that it works on R2015a.
/eric

类别

Help CenterFile Exchange 中查找有关 Formatting and Annotation 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by