"Sadik " <sadik.hava@gmail.com> wrote in message <iq5094$i6c$1@newscl01ah.mathworks.com>...
> Hi Salman,
>
> The problem is with the usage of surf. If you want to make a plot of Z1 vs. Z and T, then Z1 should be the third argument.
>
> Here is an example that works, but you will need to modify it if it is not doing what you want theoretically.
>
> t=linspace(0,.00000001,200);
> z=linspace(0,.0001,200);
> s=[1,0,0,0,0,0,0,0,0];
> [t,y]=ode45(@fname,t,s);
> [T,Z] = meshgrid(t,z);
> Z1=i*21445.*repmat(y(:,3),[1 size(Z,2)]).*Z21445*(TZ);
> surf(T,Z,abs(Z1))
>
> Best.
Thank you very much Dear Sadiq,
actually i did it this way, if you would please kindly take a look,
function maxbloch % all the simulation is done for the case of zero probe detuning
t=linspace(0,.00000001,200);
z=linspace(0,.0001,200);
s=[1,0,0,0,0,0,0,0,0];
[t,y]=ode45(@salman3,t,s);
f=repmat(t,1,200);
z1=i*(2140967)*y(:,3)*z;
g=repmat(z,200,1);
k=z123567*(gz1/34);%the large number is the constant of integration that i have chosen randomly.
surf(t,z,abs(k));
isn't this also correct?
I am thankful for your precious time.
