필터 지우기
필터 지우기

Why won't this compute?

조회 수: 2 (최근 30일)
James Panhorst
James Panhorst 2019년 1월 23일
답변: Image Analyst 2019년 1월 23일
(10/13)-(18/(5(7))-5(9sqrt(2))

채택된 답변

Star Strider
Star Strider 2019년 1월 23일
I’ve never seen that syntax in any programming language I’ve ever encountered.
If I parse it as:
strange_expression = (10/13)-(18/(5*7)-5*9*sqrt(2))
it evaluates to
strange_expression =
63.8946
I have absolutely no idea if that is correct.
  댓글 수: 2
James Panhorst
James Panhorst 2019년 1월 23일
I am in an intro class to computer engineering and am learning the basics of matlab. It just has to be a simple math equation and this answer looks corect, I just couldn't get an answer out of it. Thanks a lot!
Star Strider
Star Strider 2019년 1월 23일
My pleasure!
If my Answer helped you solve your problem, please Accept it!

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

추가 답변 (1개)

Image Analyst
Image Analyst 2019년 1월 23일
When you see things in a book that are like y = mx+20b, where variables and/or numbers are right next to each other, in a computer language you need to separate them with a multiplication operator, like
y = m * x + 20 * b
So 5(7) is really 5 * (7) which is 5 * 7.
And 9sqrt(2) is really 9 * sqrt(2).

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by