|
From: | Ben Abbott |
Subject: | Re: parametric functions&surfaces |
Date: | Fri, 02 May 2008 07:32:51 -0400 |
On May 2, 2008, at 6:20 AM, Alessandro Bandera wrote:
Sorry in advance if I bother you, But I need to plot or mesh a simple function f(x) for instance for x=(0:0.1:1)’; y=sqrt(1-x^2).Since the competence I have at the moment..no way. Tried in different wayswith cos e sin but no way to plot a quarter of a circle o quarter ofcylinder…help! Even tried with parametric forms : x=(1-t^2)/(1+t^2) and y=2*t/(1+t^2) but the results were far from expected( t is a vector then Iknow that t^2=t*t') Alessandro
To start you'll need to do something like ... t=(0:0.1:1); x=(1-t.^2)./(1+t.^2); y=2*t./(1+t.^2);Notice the "."s ... this forced an element by element evaluation of the operation.
I'm uncertain as to what you mean by "mesh" ... but you can produce a plot by
plot (t, x, t, y) Ben
[Prev in Thread] | Current Thread | [Next in Thread] |