how to write cos*cos*sin

7 views (last 30 days)
Jose Louis
Jose Louis on 14 Jul 2016
Commented: Azzi Abdelmalek on 15 Jul 2016
how to write cos*cos*sin

Answers (2)

Azzi Abdelmalek
Azzi Abdelmalek on 14 Jul 2016
f=@(x) cos(x)*cos(x)*sin(x)
  2 Comments
Jose Louis
Jose Louis on 15 Jul 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 on 15 Jul 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

Sign in to comment.


Star Strider
Star Strider on 15 Jul 2016
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

Community Treasure Hunt

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

Start Hunting!