MATLAB Answers

Function Generation Error (Not enough input arguments)

조회 수: 6(최근 30일)
I was trying to generate a function, but repeatedly faced the same error that I could not figure out on my own. What I was doing is to simply create a parabolic function with the algorithm below:
function [y] = deneme(x)
y = x.^2;
end
The error message is "Not enough input arguments. Error in deneme (line 2) y = x.^2;"

  댓글 수: 0

로그인 to comment.

채택된 답변

Mischa Kim
Mischa Kim 10 Nov 2017
Store the function in a file called deneme.m and then execute in the MATLAB command window
y = deneme(3)

  댓글 수: 0

로그인 to comment.

More Answers (0)

이 질문에 답변하려면 로그인을(를) 수행하십시오.


Translated by