Prev: FFT
Next: i need help in my final year project
From: kalam_gre AZED on 6 May 2010 05:23 hello my friends, i will be greatful if someone help me out with the following error thetaB=-pi; while thetaB<=pi f2=((d^2+t*c^2)*(d^2*c+t^2*c^3-2*t*c^2*cos(y)))/(d*cos(y)-t*c)^3; PAS_DB=(Lamd/(4*pi*d))^2*10^.05*(int(f2,t,d/c,t1)); plot(thetaB,double(PAS_DB)); hold on thetaB=thetaB+0.05; end the error is like as follows %DOUBLE cannot convert the input expression into a double array. If the input expression contains a symbolic variable, use the VPA function instead. the problem is i am not good with maipulate VPA function. can someone help me please. cheers kalam
From: kalam_gre AZED on 6 May 2010 05:29 "kalam_gre AZED" <kalam_gre(a)mathworks.com> wrote in message <hru1pr$4tk$1(a)fred.mathworks.com>... > hello my friends, > i will be greatful if someone help me out with the following error > thetaB=-pi; > while thetaB<=pi > f2=((d^2+t*c^2)*(d^2*c+t^2*c^3-2*t*c^2*cos(y)))/(d*cos(y)-t*c)^3; > PAS_DB=(Lamd/(4*pi*d))^2*10^.05*(int(f2,t,d/c,t1)); > plot(thetaB,double(PAS_DB)); > hold on > thetaB=thetaB+0.05; > end > the error is like as follows > %DOUBLE cannot convert the input expression into a double array. > If the input expression contains a symbolic variable, use the VPA function instead. > > the problem is i am not good with maipulate VPA function. can someone help me please. > > cheers > kalam or any other way to plot this, if you know help me out please
From: Steven Lord on 6 May 2010 15:17 "kalam_gre AZED" <kalam_gre(a)mathworks.com> wrote in message news:hru1pr$4tk$1(a)fred.mathworks.com... > hello my friends, > i will be greatful if someone help me out with the > following error > thetaB=-pi; > while thetaB<=pi > f2=((d^2+t*c^2)*(d^2*c+t^2*c^3-2*t*c^2*cos(y)))/(d*cos(y)-t*c)^3; > PAS_DB=(Lamd/(4*pi*d))^2*10^.05*(int(f2,t,d/c,t1)); > plot(thetaB,double(PAS_DB)); > hold on > thetaB=thetaB+0.05; > end > the error is like as follows > %DOUBLE cannot convert the input expression into a double array. > If the input expression contains a symbolic variable, use the VPA function > instead. > > the problem is i am not good with maipulate VPA function. can someone help > me please. > > cheers > kalam > Your expression contains one or more symbolic variables. You cannot convert your array to double without providing a numeric value for any such variables using SUBS. -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
From: us on 6 May 2010 16:44 "kalam_gre AZED" <kalam_gre(a)mathworks.com> wrote in message <hru1pr$4tk$1(a)fred.mathworks.com>... > hello my friends, > i will be greatful if someone help me out with the following error > thetaB=-pi; > while thetaB<=pi > f2=((d^2+t*c^2)*(d^2*c+t^2*c^3-2*t*c^2*cos(y)))/(d*cos(y)-t*c)^3; > PAS_DB=(Lamd/(4*pi*d))^2*10^.05*(int(f2,t,d/c,t1)); > plot(thetaB,double(PAS_DB)); > hold on > thetaB=thetaB+0.05; > end > the error is like as follows > %DOUBLE cannot convert the input expression into a double array. > If the input expression contains a symbolic variable, use the VPA function instead. > > the problem is i am not good with maipulate VPA function. can someone help me please. > > cheers > kalam first, provide a working snippet... copy/pasting your example yields ??? Undefined function or variable 'd'. us
From: kalam_gre AZED on 9 May 2010 11:21
"us " <us(a)neurol.unizh.ch> wrote in message <hrv9ml$g3q$1(a)fred.mathworks.com>... > "kalam_gre AZED" <kalam_gre(a)mathworks.com> wrote in message <hru1pr$4tk$1(a)fred.mathworks.com>... > > hello my friends, > > i will be greatful if someone help me out with the following error > > thetaB=-pi; > > while thetaB<=pi > > f2=((d^2+t*c^2)*(d^2*c+t^2*c^3-2*t*c^2*cos(y)))/(d*cos(y)-t*c)^3; > > PAS_DB=(Lamd/(4*pi*d))^2*10^.05*(int(f2,t,d/c,t1)); > > plot(thetaB,double(PAS_DB)); > > hold on > > thetaB=thetaB+0.05; > > end > > the error is like as follows > > %DOUBLE cannot convert the input expression into a double array. > > If the input expression contains a symbolic variable, use the VPA function instead. > > > > the problem is i am not good with maipulate VPA function. can someone help me please. > > > > cheers > > kalam > > first, provide a working snippet... > copy/pasting your example yields > > ??? Undefined function or variable 'd'. > > us hello us that wasn't my whole code, here we go %%%%%%% PAS %%%%%%% %%%%%%%%%% angel is constant here %%%%%%%%%% time is the variable clc; clear all; syms c d y t ; c=3*10^8; freq=60*10^10; t1=5*1e-6; d=1000; Lamd=c/freq; thetaB=-pi; %PAS_DB = sym(zeros(3,1,1,3)); %PAS_DB=sym('PAS_DB'); %double ('PAS_DB'); while thetaB<=pi f2=((d^2+t*c^2)*(d^2*c+t^2*c^3-2*t*c^2*cos(y)))/(d*cos(y)-t*c)^3; PAS_DB=(Lamd/(4*pi*d))^2*10^.05*(int(f2,t,d/c,t1)); %X=(vectorize(PAS_DB)); plot(thetaB,double(PAS_DB)); %ezplot(10*log10(PAS_DB),[-pi,+pi]); %ezplot('PAS_DB',[-pi,pi]); %cdfplot(PAS_DB) hold on thetaB=thetaB+1; end hold on xlabel('angel'); ylabel('DB'); title('Power Azimuth Specturm') cheers kalam |