How to convert this equation to MATLAB code?

조회 수: 5 (최근 30일)
JM
JM 2020년 9월 24일
편집: JM 2021년 6월 30일
I am having difficulty writing this long equation into matlab code, please advise
  댓글 수: 8
Adam Danz
Adam Danz 2020년 9월 24일
Sounds like you figured it out! Socially distant 3-way high-five!
Rik
Rik 2021년 4월 20일
I recovered the removed content from the Google cache (something which anyone can do). Editing away your question is very rude. Someone spent time reading your question, understanding your issue, figuring out the solution, and writing an answer. Now you repay that kindness by ensuring that the next person with a similar question can't benefit from this answer.

댓글을 달려면 로그인하십시오.

채택된 답변

John D'Errico
John D'Errico 2020년 9월 24일
편집: John D'Errico 2020년 9월 24일
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개)

카테고리

Help CenterFile Exchange에서 Historical Contests에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by