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!