Help me about plot y = 1/x

6 Ansichten (letzte 30 Tage)
Nguyen Trong Nhan
Nguyen Trong Nhan am 21 Dez. 2013
Beantwortet: Shreedhar Sarda am 15 Jan. 2022
I want to plot the graph y = 1/x. I do in command window :
syms x y
x=0,0.1,1;
y=1/x;
plot(x,y)
I appear the error like this:
??? Error using ==> mldivide Matrix dimensions must agree
could you please help me repair this error to plot the graph y = 1/x. thanks

Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 21 Dez. 2013
x=0:0.1:1;
y=1./x;
plot(x,y)
  5 Kommentare
Sandor Fogassy
Sandor Fogassy am 11 Jan. 2017
Thank you.
Giuseppe Degan Di Dieco
Giuseppe Degan Di Dieco am 9 Okt. 2021
Thank you mate.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Shreedhar Sarda
Shreedhar Sarda am 15 Jan. 2022
Plot the function y=1/x in domain -2 to 2. At what point this function is not continuous?

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by