Why am I receiving this error?

1 Ansicht (letzte 30 Tage)
Christina
Christina am 31 Dez. 2022
Bearbeitet: Paul am 31 Dez. 2022
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 Kommentar
Christina
Christina am 31 Dez. 2022
a = 3*cos(pi)-2*log(3)+e^4
is also invalid

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Paul
Paul am 31 Dez. 2022
Bearbeitet: Paul am 31 Dez. 2022
Assuming you want a numerical evaluation, check out these doc pages: log , exp

Weitere Antworten (2)

Matt J
Matt J am 31 Dez. 2022
Try deleting line 9 and retyping it.

Walter Roberson
Walter Roberson am 31 Dez. 2022
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.

Community Treasure Hunt

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

Start Hunting!

Translated by