area() not working
古いコメントを表示
Hi, The in-build matlab function area() stopped working. I tried to run the example from the documentation:
Y = [1, 5, 3;
3, 2, 7;
1, 5, 3;
2, 6, 1];
figure
area(Y)
but I would get the error message
Error using area (line 35)
Too many input arguments.
I also tried to restart Matlab, as well as my PC. I am using 8.5.0.197613 (R2015a).
Regards, JC
回答 (1 件)
Image Analyst
2016 年 3 月 17 日
You didn't call your script area.m, did you? If so, name it something else because that would destroy the built-in area() function. What does this say:
which -all area
5 件のコメント
Jean-Claude
2016 年 3 月 17 日
Image Analyst
2016 年 3 月 17 日
When you hit that line in the debugger, type F11 (step into) and see which one you actually go into.
There is a rmpath() function but I'd be very leery about removing toolbox folders from your path.
Jean-Claude
2016 年 3 月 17 日
Steven Lord
2016 年 3 月 17 日
Don't remove the polyfun directory from your path. That overload of AREA for alphaShape objects will only be called if one of the inputs is an alphaShape object; it won't be executed otherwise. It won't interfere with a standard AREA call with one numeric array as input.
From the WHICH output it looks like this is running on MATLAB Production Server, correct? I'm not as familiar with that product as I am with MATLAB so I'm not sure what's causing this error. You may want to contact Technical Support and have them help you determine the cause of this problem.
Image Analyst
2016 年 3 月 17 日
Please give us the complete error message - ALL the red text, including the line number and line of code that was actually run. I just want to see what it thinks you called because I can't see how it can claim one input argument is too many. Though, if you have a maintenance/support contract (like if you bought the product within the last year or have a trial version), I'd definitely call them.
カテゴリ
ヘルプ センター および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!