Help me about plot y = 1/x

4 vues (au cours des 30 derniers jours)
Nguyen Trong Nhan
Nguyen Trong Nhan le 21 Déc 2013
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

Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 21 Déc 2013
x=0:0.1:1;
y=1./x;
plot(x,y)
  5 commentaires
Sandor Fogassy
Sandor Fogassy le 11 Jan 2017
Thank you.
Giuseppe Degan Di Dieco
Giuseppe Degan Di Dieco le 9 Oct 2021
Thank you mate.

Connectez-vous pour commenter.

Plus de réponses (1)

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

Tags

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by