Whilst this looks like some kind of valid code, it's not valid MATLAB.
I'm guessing you've never written any MATLAB at all, so jumping right in with a stepwise differential is probably not the best tutorial.
Take a look here for lots of resources.
http://www.mathworks.com/academia/student_center/tutorials/launchpad.html
Pay particular attention to loops and arithmetic and matrrix operations (i.e. "*" and "/").
Justin
"Niraj " <niraj.jha@rub.de> wrote in message <k75a9u$p56$1@newscl01ah.mathworks.com>...
> Dear frnds,
>
> look into my code and please suggest the changes if you find any error
>
> a = 0;
> b= 0.2;
> muo= 0.5;
> dc = .001;
> vo = .001;
> k = 1000000;
> dt = 1;
> theta = dc/vo;
> thetaold = theta;
> v = vo;
> loop = 0;
> change =0;
> while 0< change <.001
> loop = loop+1;
>
> %%vtrue calculation
> v = 2*vo +(1/k)*(a*(vvo))*(1/dt)+ b*v*(1/(2*vo))*log((v*theta)/dc) ;
> %temperature calculation
>
> theta = theta  v*theta*(1/dc)*(dt)*log((v*theta)/dc);
> end
> change = vvold;
> plot(v);
