|
Mary <nonlosoenonmiimporta@gmail.com> wrote in message
<8b0923e1-d6e4-43e8-a3c0-
784c04b17ae5@t54g2000hsg.googlegroups.com>...
> On Jun 4, 4:41=A0pm, "David " <d...@bigcompany.com>
wrote:
> > Mary <nonlosoenonmiimpo...@gmail.com> wrote in message
> >
> > <2254c59c-495a-485d-982b-
> > 895951c2c...@b1g2000hsg.googlegroups.com>...
> >
> >
> >
> >
> >
> > > On 4 Giu, 11:48, "David " <d...@bigcompany.com>
wrote:
> > > > Mary <nonlosoenonmiimpo...@gmail.com> wrote in
message
> >
> > > > <86724440-f594-4a2e-98b2-
> > > > 52ebc6afa...@m3g2000hsc.googlegroups.com>...
> >
> > > > > someone know how to create bidimensional waves in
> > > > Matlab??? I need to
> > > > > created a Gui interface with bidimensional waves
> >
> > > > > thanks so all
> > > > > =3DA0please some one help me!!!
> >
> > > > i had never heard the term 'bidimensional waves'
> > before so
> > > > i did a bit of googling... From the collections of
> > stuff i
> > > > found there appear to be maybe 3 uses of the
> > > > term 'bidimensional' with respect to waves.
=3DA0One
> > appears
> > > > to be vibrating membranes, like drum heads, this
makes
> > > > sense. =3DA0another is somehow related to ocean
waves,
> > which i
> > > > can probably understand also. =3DA0A third appears
to be
> > some
> > > > kind of gut merging a fractal universe with
biological
> > > > waves exchanging time and energy as they transform
> > from a
> > > > line to a 4d holographic world, or some such mumbo
> > jumbo.
> >
> > > > Which type of 'bidimensional waves' are you trying
to
> > do
> > > > something with, and what kind of gui 'interface'
are
> > you
> > > > trying to make with them???
> >
> > > Yes what i would like to create is something like a
> > ocean wave in 3D!
> > > i created a GUi where it shows two waves made by sin
and
> > cosine that
> > > are running one near eachother but i need to create
this
> > Gui showing
> > > 3D waves that moves on the surface......i mean i
would
> > like to make my
> > > monodimensional waves that now they appear just as a
> > line ,seem like a
> > > ocean wave in 3D space!
> >
> > > u have some suggestions?
> > > thanks a lot
> >
> > the basic steps would be to make an x,y grid and
populate
> > it with z elevations then use the surf() function. =A0
> > try 'doc surf' and look at the related functions and
> > topics at the bottom for more useful things.- Hide
quoted text -
> >
> > - Show quoted text -
>
>
> Thanks a lot for ur advice
> i tried to use the surf() function but it says me
there's an error in
> the callback! here there's the pice of code i should
manipulate i
> think!!
>
> t=3Dvariabili.t;
> cla;
> deltat=3D0.02;
> x=3D-6:0.1:6;
> % I create the plots in a plane way.Later i will
draw the wave
> by setting the handlers
>
> hp1=3Dplot(x,zeros(size(x)),'b-');
> hp2=3Dplot(x,zeros(size(x)),'g-');
> set(hp1,'EraseMode','xor');
> set(hp2,'EraseMode','xor');
>
> % I start the animation
>
> while (variabili.esegui)
> % I set again the vertical dimension coz the
high of the
> wave may have changed
>
> max_y=3Dget(variabili.sli_A1,'value')
> +get(variabili.sli_A2,'value');
> set(variabili.assi,'YLim',[-max_y*1.1
max_y*1.1]);
>
> % Creating the coordinates vectors
> % variabili.sli A1 is the value of the high into the
slider of the
> first wave
> %variabili.sli.p1 is the value of the slider containing
the phase of
> the 1st wave
> % variabili.a2 and p2 are the same of above but for the
2nd wave
>
>
> y1=3Dget(variabili.sli_A1,'value')*sin(get
(variabili.sli_p1,'value')*t +
> x);
>
> y2=3Dget(variabili.sli_A2,'value')*sin(get
(variabili.sli_p2,'value')*t +
> x);
>
>
> t=3D t + deltat;
> set(hp1,'XData',x,'YData',y1);
> set(hp2,'XData',x,'YData',y2);
> drawnow;
> pause(0.01);
>
>
> I think something should changed here using the function
Surf but i
> dont know what coz I started to be very stuck with this
Gui
> programm....can u be so kind to help please ???
> if u need other pieces of programm i will send u
> thanks again for your help
> Mary
>
i don't know the 3dplot function you are using. can you
draw a single surface plot? try setting a breakpoint in
the script before the line with the error and stepping
through it while checking the values to see if the
function has the data you expect. remember, functions
have their own workspaces so variables defined inside
functions won't be visible outside, and they won't see
anything in the main workspace directly either.
|