how to write cos*cos*sin

Answers (2)

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

2 Comments

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
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

Sign in to comment.

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.

Categories

Find more on Operators and Elementary Operations in Help Center and File Exchange

Asked:

on 14 Jul 2016

Commented:

on 15 Jul 2016

Community Treasure Hunt

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

Start Hunting!