MATLAB Answers

PLEASE HELP ME CONVERT THIS EQUATION TO MATLAB CODE

3 views (last 30 days)
I don't understand how to write this long equation into matlab code, please help!

  7 Comments

Show 4 older comments
Adam Danz
Adam Danz on 24 Sep 2020
You haven't implemented my "critical mistake" #1 or John's 1/2*3 advice (same advice, two different people). The demonimator is still incorrect.
Adam Danz
Adam Danz on 24 Sep 2020
Sounds like you figured it out! Socially distant 3-way high-five!

Sign in to comment.

Accepted Answer

John D'Errico
John D'Errico on 24 Sep 2020
Edited: John D'Errico on 24 Sep 2020
Well, you did make an effort, and it was pretty close. But did you read my response?
Did you read the help for tand and cosd? Why not? There was a reason I wrote that hint. They are different from tan and cos. tan and cos work in radians. But you seem to be using DEGREES. So you NEED to use cosd and tand.
Next, you MULTIPLIED by cos(30). While you may think that
1/2*3
ans =
1.5
should yield 1/6 as a result, it does not. If you want to divide by the product of two numbers, you need them in parens. So something like this
1/(2*3)
ans =
0.16667

  0 Comments

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by