-
Direct link to this question
⋮
-
Direct link to this question
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
Direct link to this comment
⋮
-
Link
Direct link to this comment
my friend use matlab r2013a and it works
Direct link to this comment
⋮
-
Link
Direct link to this comment
Please post you actual code, not an image of it.
Direct link to this comment
⋮
-
Link
Direct link to this comment
Direct link to this comment
⋮
-
Link
Direct link to this comment
Edited: Jan
on 2 Mar 2016
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)’)
Direct link to this comment
⋮
-
Link
Direct link to this comment
Edited: Jan
on 2 Mar 2016
And if you copy and paste this code in the command window, you get the same error?
Direct link to this comment
⋮
-
Link
Direct link to this comment
i got the solution, it was t={Character: ASCII Code 2}-2:.1:5; so i need to erase the special char. Sorry my apologies
Sign in to comment.
Accepted Answer
-
Direct link to this answer
⋮
-
Direct link to this answer
Edited: Jan
on 2 Mar 2016
The error message seems to tell, that the equal character «=» is not valid. How strange. Perhaps it is the space behind the =, which is a backspace charcter ‘b’ ?!
The code looks okay. How did you insert it to the command window? Simply try to type it again.
What is in the line above? Perhaps a continuation ‘…’ and you’ve added the «>>» manually? I admit, this is wild guessing.
1 Comment
Direct link to this comment
⋮
-
Link
Direct link to this comment
i just copy paste it from the ebook to matlab editor
Sign in to comment.
More Answers (2)
-
Direct link to this answer
⋮
-
Direct link to this answer
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
Direct link to this comment
⋮
-
Link
Direct link to this comment
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.
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».]
Direct link to this comment
⋮
-
Link
Direct link to this comment
@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.
Sign in to comment.
-
Direct link to this answer
⋮
-
Direct link to this answer
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
Direct link to this comment
⋮
-
Link
Direct link to this 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
/MATLAB/toolbox/images/images/imhist.m
/MATLAB/toolbox/images/images/@gpuArray/imhist.m % Shadowed gpuArray method
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
1 function [yout,x] = imhist(varargin)
Which release of Image Processing Toolbox are you using?
ver images
——————————————————————————————————
MATLAB Version: 9.9.0.1544872 (R2020b) Update 3
MATLAB License Number:
Operating System: Linux 4.14.195-0414195-generic #202008260539 SMP Wed Aug 26 11:20:58 UTC 2020 x86_64
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
——————————————————————————————————
Image Processing Toolbox Version 11.2 (R2020b)
Sign in to comment.
See Also
Categories
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
-
Direct link to this question
⋮
-
Direct link to this question
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
Direct link to this comment
⋮
-
Link
Direct link to this comment
my friend use matlab r2013a and it works
Direct link to this comment
⋮
-
Link
Direct link to this comment
Please post you actual code, not an image of it.
Direct link to this comment
⋮
-
Link
Direct link to this comment
Direct link to this comment
⋮
-
Link
Direct link to this comment
Edited: Jan
on 2 Mar 2016
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)’)
Direct link to this comment
⋮
-
Link
Direct link to this comment
Edited: Jan
on 2 Mar 2016
And if you copy and paste this code in the command window, you get the same error?
Direct link to this comment
⋮
-
Link
Direct link to this comment
i got the solution, it was t={Character: ASCII Code 2}-2:.1:5; so i need to erase the special char. Sorry my apologies
Sign in to comment.
Accepted Answer
-
Direct link to this answer
⋮
-
Direct link to this answer
Edited: Jan
on 2 Mar 2016
The error message seems to tell, that the equal character «=» is not valid. How strange. Perhaps it is the space behind the =, which is a backspace charcter ‘b’ ?!
The code looks okay. How did you insert it to the command window? Simply try to type it again.
What is in the line above? Perhaps a continuation ‘…’ and you’ve added the «>>» manually? I admit, this is wild guessing.
1 Comment
Direct link to this comment
⋮
-
Link
Direct link to this comment
i just copy paste it from the ebook to matlab editor
Sign in to comment.
More Answers (2)
-
Direct link to this answer
⋮
-
Direct link to this answer
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
Direct link to this comment
⋮
-
Link
Direct link to this comment
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.
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».]
Direct link to this comment
⋮
-
Link
Direct link to this comment
@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.
Sign in to comment.
-
Direct link to this answer
⋮
-
Direct link to this answer
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
Direct link to this comment
⋮
-
Link
Direct link to this 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
/MATLAB/toolbox/images/images/imhist.m
/MATLAB/toolbox/images/images/@gpuArray/imhist.m % Shadowed gpuArray method
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
1 function [yout,x] = imhist(varargin)
Which release of Image Processing Toolbox are you using?
ver images
——————————————————————————————————
MATLAB Version: 9.9.0.1544872 (R2020b) Update 3
MATLAB License Number:
Operating System: Linux 4.14.195-0414195-generic #202008260539 SMP Wed Aug 26 11:20:58 UTC 2020 x86_64
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
——————————————————————————————————
Image Processing Toolbox Version 11.2 (R2020b)
Sign in to comment.
See Also
Categories
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
-
Direct link to this question
⋮
-
Direct link to this question
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
Direct link to this comment
⋮
-
Link
Direct link to this comment
my friend use matlab r2013a and it works
Direct link to this comment
⋮
-
Link
Direct link to this comment
Please post you actual code, not an image of it.
Direct link to this comment
⋮
-
Link
Direct link to this comment
Direct link to this comment
⋮
-
Link
Direct link to this comment
Edited: Jan
on 2 Mar 2016
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)’)
Direct link to this comment
⋮
-
Link
Direct link to this comment
Edited: Jan
on 2 Mar 2016
And if you copy and paste this code in the command window, you get the same error?
Direct link to this comment
⋮
-
Link
Direct link to this comment
i got the solution, it was t={Character: ASCII Code 2}-2:.1:5; so i need to erase the special char. Sorry my apologies
Sign in to comment.
Accepted Answer
-
Direct link to this answer
⋮
-
Direct link to this answer
Edited: Jan
on 2 Mar 2016
The error message seems to tell, that the equal character «=» is not valid. How strange. Perhaps it is the space behind the =, which is a backspace charcter ‘b’ ?!
The code looks okay. How did you insert it to the command window? Simply try to type it again.
What is in the line above? Perhaps a continuation ‘…’ and you’ve added the «>>» manually? I admit, this is wild guessing.
1 Comment
Direct link to this comment
⋮
-
Link
Direct link to this comment
i just copy paste it from the ebook to matlab editor
Sign in to comment.
More Answers (2)
-
Direct link to this answer
⋮
-
Direct link to this answer
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
Direct link to this comment
⋮
-
Link
Direct link to this comment
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.
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».]
Direct link to this comment
⋮
-
Link
Direct link to this comment
@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.
Sign in to comment.
-
Direct link to this answer
⋮
-
Direct link to this answer
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
Direct link to this comment
⋮
-
Link
Direct link to this 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
/MATLAB/toolbox/images/images/imhist.m
/MATLAB/toolbox/images/images/@gpuArray/imhist.m % Shadowed gpuArray method
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
1 function [yout,x] = imhist(varargin)
Which release of Image Processing Toolbox are you using?
ver images
——————————————————————————————————
MATLAB Version: 9.9.0.1544872 (R2020b) Update 3
MATLAB License Number:
Operating System: Linux 4.14.195-0414195-generic #202008260539 SMP Wed Aug 26 11:20:58 UTC 2020 x86_64
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
——————————————————————————————————
Image Processing Toolbox Version 11.2 (R2020b)
Sign in to comment.
See Also
Categories
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Translated by