not enough input argument error
이전 댓글 표시
when I put( [1×128 double], 'E') as input argument it says that "Error using double. Not enough input argument. " What's wrong with it ?
댓글 수: 1
madhan ravi
2020년 6월 3일
We are not magicians , show the code.
채택된 답변
추가 답변 (1개)
Steven Lord
2020년 6월 3일
It seems like you're trying to call a function using the description of a variable from the Workspace window rather than the variable itself.
It's like you tried to define a variable named x that is a double array of size 1x10.
>> x = 1:10;
>> whos x
Name Size Bytes Class Attributes
x 1x10 80 double
In order to call a function like sin on it, you don't pass in the description of the variable:
>> sin(1x10 double)
sin(1x10 double)
↑
Error: Invalid expression. Check for missing multiplication operator, missing or
unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead
of parentheses.
Instead you pass the variable itself. Note that after I do that, y becomes a 1x10 double just like x was and is. Each element of y is the sine of the corresponding element of x: y(1) is the sine of x(1), y(2) the sine of x(2), etc.
>> y = sin(x);
>> whos x y
Name Size Bytes Class Attributes
x 1x10 80 double
y 1x10 80 double
카테고리
도움말 센터 및 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!
