Borrar filtros
Borrar filtros

how to plot these functions?

1 visualización (últimos 30 días)
thar
thar el 11 de Mzo. de 2014
Respondida: Roger Stafford el 12 de Mzo. de 2014
how to plot these functions in matlab 2013b?
  1. 49y^2-56x+16=0
  2. X^2+Y^2-(32/49)=0
  1 comentario
dpb
dpb el 11 de Mzo. de 2014
doc meshgrid % example of writing 2D function and plotting

Iniciar sesión para comentar.

Respuestas (2)

Walter Roberson
Walter Roberson el 11 de Mzo. de 2014

Roger Stafford
Roger Stafford el 12 de Mzo. de 2014
Successfully plotting such relationships often involves selecting the appropriate parameter. In the case of the first equation, that would be one of the variables, namely, y. If a range of y values is generated using 'linspace', then x is easily expressed as a function of y:
y = linspace(-5,5,1000);
x = (49*y.^2+16)/56;
This can then be plotted:
plot(x,y)
For the second equation, which is that of a circle, a good parameter to use is the angle of a vector from the origin to a point (X,Y) on the circle, which can be generated to vary between 0 and 2*pi. Then X and Y can be expressed in terms of that angle and the circle plotted.

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by