Error: The input character is not valid in MATLAB statements or expressions.
Show older comments
Hi, i have an error when i try to run this
t=-2:.1:5;
x=3*exp(0.4*t);
y=2*exp(-0.9*t);
plot(t,x,t,y,':');
legend('x(t)','y(t)')
i'm new to matlab, please help ASAP :( ps : i'm using matlab r2012b
6 Comments
Nugroho Permata Putra
on 2 Mar 2016
Star Strider
on 2 Mar 2016
Please post you actual code, not an image of it.
Jan
on 2 Mar 2016
Please consider the 2nd top most voted thread: http://www.mathworks.com/matlabcentral/answers/29922-why-your-question-is-not-urgent-or-an-emergency and remove the ASAP.
Nugroho Permata Putra
on 2 Mar 2016
Edited: Jan
on 2 Mar 2016
I've formatted your code. Please read: http://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup. Thanks.
And if you copy and paste this code in the command window, you get the same error?
Nugroho Permata Putra
on 2 Mar 2016
Accepted Answer
More Answers (2)
Kaya Wydler Cunningham
on 5 Jan 2017
Edited: Walter Roberson
on 5 Jan 2017
The input character is not valid in MATLAB statements or expressions.
Error in lv (line 11)
[t,y] = ode45(@lvfun,[0 200],[1 1]); % solve ODE system over
Unsure as to what this means?
2 Comments
Steven Lord
on 5 Jan 2017
One or more of the characters in that expression (or perhaps inside lvfun) should be underlined in red in the Editor. If it is, tell us which one it is; copy and paste it between the single quotes in the following command; and tell us what MATLAB displays when you execute that command.
double('')
My suspicion is that you copied and pasted the code from something (Microsoft Word® for instance) that tries to be "nice" with its formatting. [The most common culprit is the "smart quote".]
Jan
on 5 Jan 2017
@Kaya: Please do not post a new question in the section for answers, but open a new thread. Then post the complete error message. It seems like the most interesting part is missing.
Ahmed Makhlas
on 4 Jan 2021
0 votes
j'ai une erreur au niveau de la fonction imhist quelq'un qui aide moi
img=imread('lena1.png');
subplot(1,2,1);
imshow(img)
img=rgb2gray(img);
subplot(1,2,2)
imhist(img) %???????????????????????????
Error: File: imhist.m Line: 1 Column: 1
The input character is not valid in MATLAB statements or expressions.
1 Comment
First, I want to check whether you're calling the imhist.m included in Image Processing Toolbox or you're calling an imhist.m that you created or downloaded. What does this command display?
which -all imhist
If you're using the imhist function from Image Processing Toolbox, I want to check that you haven't accidentally modified it. What does this command display?
dbtype 1:1 imhist.m
Which release of Image Processing Toolbox are you using?
ver images
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!