how to write cos*cos*sin

Réponses (2)

Azzi Abdelmalek
Azzi Abdelmalek le 14 Juil 2016

0 votes

f=@(x) cos(x)*cos(x)*sin(x)

2 commentaires

Jose Louis
Jose Louis le 15 Juil 2016
Matlab does not accept that, for example, if I have three angles (Alpha, Beta, Gama) and I need to solve X= cos(Alpha)*Sin(Beta)* sin(Gama) Matlab does not accept that
Azzi Abdelmalek
Azzi Abdelmalek le 15 Juil 2016
There is nothing about solving in your question, please edit your question and make it clear, explain what are you data and what are your unknown variables

Connectez-vous pour commenter.

Star Strider
Star Strider le 15 Juil 2016

0 votes

You have to use element-wise operations:
ccs = @(x) cos(x).*cos(x).*sin(x);
See Array vs. Matrix Operations for a full explanation of the difference.

Catégories

En savoir plus sur Operators and Elementary Operations dans Centre d'aide et File Exchange

Question posée :

le 14 Juil 2016

Commenté :

le 15 Juil 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by