Why am I receiving this error?

조회 수: 10 (최근 30일)
Christina
Christina 2022년 12월 31일
편집: Paul 2022년 12월 31일
a = 3*cos(pi)-2*ln(3)+e^4
Error: File: matlabassignment1.m Line: 9 Column: 19
Invalid text character. Check for unsupported symbol, invisible character, or pasting of non-ASCII characters.
  댓글 수: 1
Christina
Christina 2022년 12월 31일
a = 3*cos(pi)-2*log(3)+e^4
is also invalid

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

채택된 답변

Paul
Paul 2022년 12월 31일
편집: Paul 2022년 12월 31일
Assuming you want a numerical evaluation, check out these doc pages: log , exp

추가 답변 (2개)

Matt J
Matt J 2022년 12월 31일
Try deleting line 9 and retyping it.

Walter Roberson
Walter Roberson 2022년 12월 31일
In between the n and the ( you have unicode character decimal 8289, which is known as "Function Application". It is an invisible character in most fonts
Note: e^4 should be written as exp(4) and ln(3) should be log(3)
There turn out to be relatively few programming languages that use ln to indicate logarithm.

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by