Error using cos.Not enough input arguments.
Mostra commenti meno recenti
Hi all,
Can anyone help me with this problem - Error using cos Not enough input arguments.
A2=sinh((x^2)+cos^2*y)^3/sqrt(abs(x-cos(y))+ln*(abs((x-cos(y)))/(x^2)+(cos^2)*y+abs(sin)*x))
Error using cos
Not enough input arguments.
i am new to matlab and i need to rezolve these expresition.
1 Commento
The function cos requires one input argument. As the error message states, you have called cos with no input argument, which throws an error. I have marked those locations for you, showing where you have called it incorrectly:
A2=(sinh((x^2)+(cos^2)*y)^3/sqrt(abs(x-cos(y)))+ln*(abs((x-cos(y))))/(x^2)+(cos^2)*y+abs(sin(y))*x)
% ^^^^ ^^^^
Your use of matrix operations is also quite likely to be incorrect:
Risposta accettata
Più risposte (1)
Steven Lord
il 4 Set 2020
In mathematics we write
but when we implement that in MATLAB we implement it as
[not to be confused with
.]
x = pi/4;
y = cos(x)
z = cos(x).^2 % compare to y^2
w = cos(x.^2)
3 Commenti
Cristian Rosca
il 4 Set 2020
Modificato: Cristian Rosca
il 4 Set 2020
Steven Lord
il 4 Set 2020
Run those four lines. See that z is the square of y. That is how you compute the square of the cosine of an angle. cos^2(x) is not valid MATLAB syntax.
Cristian Rosca
il 4 Set 2020
Categorie
Scopri di più su Logical in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
