Invalid text character. Check for unsupported symbol, invisible character, or pasting of non-ASCII characters.

480 ビュー (過去 30 日間)
Nga Thede
Nga Thede 2020 年 4 月 10 日
コメント済み: DGM 2024 年 6 月 15 日
I really don't know what is the reason for this error. PLease help!
theta_dd(i)= (kP*r(i) +kD*r_dot(i) -(m*g*l+kP)*sin(theta(i)) -kD*theta_dot(i))/M;
  2 件のコメント
Manjunatha Manju
Manjunatha Manju 2021 年 5 月 24 日
What is the reason for this error , can you tell this.
Walter Roberson
Walter Roberson 2021 年 5 月 24 日
The cause of this kind of problem is having an invisible character such as a zero-width space, or having accidentally used "smart-quotes" instead of regular quotes.

サインインしてコメントする。

回答 (5 件)

James Browne
James Browne 2020 年 4 月 10 日
編集済み: James Browne 2020 年 4 月 10 日
It is impossible to debug your one line of code because I can't run it on my end due to undefined variables. However, if you copied and pasted that line of code into MATLAB, it is likely that there is some text character(s) in the line that you copied which matlab does not recognize.
If you did copy and paste the code, try typing it in by hand instead. Otherwise you will need to post the whole code before anyone can really help you.
  3 件のコメント
Nga Thede
Nga Thede 2020 年 4 月 10 日
The only line it said error is the line I posted above which I don't understand why cause I tried to retyped the whole line already and still saying the same thing.
Walter Roberson
Walter Roberson 2021 年 5 月 24 日
Please attach the file that is having the problem, instead of pasting in the text.

サインインしてコメントする。


Walter Roberson
Walter Roberson 2020 年 4 月 10 日
theta_dd(i)= (kP*r(i) +kD*r_dot(i) -(m*g*l+kP)*sin(theta(i)) -kD*theta_dot(i))/M;
Right after the semi-colon you have char(8203) which us U+200b which is "zero width space".
Put your cursor on the semi-colon and press shift and right arrow several times until your cursor is positioned on the next line. That should highlight several characters. Type in ; and then return. This process should get rid of the zero-width space.

Zeel Dhorajiya
Zeel Dhorajiya 2021 年 6 月 28 日
編集済み: Walter Roberson 2021 年 9 月 8 日
A={0.1/2+0.6/3+0.4/4+0.3/5+0.8/6} B={0.5/2+0.8/3+0.4/4+0.6/5+0.4/6} u=input(A); v=input(B);
↑ Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.
Please help me out
  1 件のコメント
Walter Roberson
Walter Roberson 2021 年 6 月 28 日
You used ʼ (right single quotation mark) instead of ' (vertical single quotation mark)

サインインしてコメントする。


Hem Ananth
Hem Ananth 2021 年 9 月 8 日
編集済み: Walter Roberson 2021 年 9 月 8 日
%Program for linear convolution
%to get the input sequence
n1=input('enter the length of input sequence');
n2=input('enter the length of impulse sequence');
x=input('enter the input sequence');
h=input('enter the impulse sequence');
%convolution operation
y=conv(x,h);
%to plot the signal
subplot(3,1,1);
stem(x);
ylabel('amplitude');
xlabel('n1....>');
title('input sequence')
subplot(3,1,2);
stem(h);
ylabel('amplitude');
xlabel('n2....>');
title('impulse signal')
subplot(3,1,3);
stem(y);
ylabel('amplitude');
xlabel('n3');
disp('the resultant signal is');y
  4 件のコメント

サインインしてコメントする。


Pyetra
Pyetra 2024 年 6 月 14 日
Error: Invalid text character. Check for unsupported symbol, invisible character, or pasting of non-ASCII
characters.
Alguém pode me ajudar?
  1 件のコメント
DGM
DGM 2024 年 6 月 15 日
The error message tells you exactly what the problem is and which character to fix. Fix it.
If it's the dash character, replace it with a regular 0x002D hyphen-minus.
Nobody can be certain of which type of dash character that is since you posted a screenshot. Likewise, nobody can know if there are other invalid or invisible characters hidden in your code.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeEntering Commands についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by