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

536 views (last 30 days)
Nga Thede
Nga Thede on 10 Apr 2020
Commented: Walter Roberson on 8 Sep 2021
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;

Answers (4)

James Browne
James Browne on 10 Apr 2020
Edited: James Browne on 10 Apr 2020
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.

Sign in to comment.

Walter Roberson
Walter Roberson on 10 Apr 2020
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 on 28 Jun 2021
Edited: Walter Roberson on 8 Sep 2021
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

Hem Ananth
Hem Ananth on 8 Sep 2021
Edited: Walter Roberson on 8 Sep 2021
%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
%to plot the signal
title('input sequence')
title('impulse signal')
disp('the resultant signal is');y
  1 Comment
Walter Roberson
Walter Roberson on 8 Sep 2021
Yes? What about the code?
Note that the use needs to enter [ and ] characters around the vector of data when you use input() that way. For example they would have to type in
[.3 .8]
complete with the [ and ]

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by