How to solve this Error: unable to resolve syms to a function call

Status
Not open for further replies.

Tima987

Newbie level 4
Joined
Mar 30, 2014
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
27
Code:
syms x, k;
h=2;
s0= (120*pi)/(2 * pi);
s1= symsum ((( -1) .^k * (h) .^ (2*k) ) /( (2*k)* factorial (2*k)) ,k , l , inf) ;
v= 0.5 *sin (h);v1= symsum((( -1) .^k * (2*h) .^ ((2*k)+1))  /( ((2*k)+1)* factorial ((2*k+1))) ,k , 0, inf);
v2= symsum((( -1) .^k * (h) .^ ((2*k)+1))  /( ((2*k)+1)* factorial ((2*k+1))) ,k , 0, inf);
v3=2*v2;
v4= v1-v3;
s2=v*v4;
a= 0.5*cos(h);
a1= -0.69;
a2= symsum((( -1) .^k * (2*h) .^ (2*k))  /( (2*k)* factorial (2*k)) ,k , 1, inf);
a3=2*s1;
a4=a1+a2-a3
s3= a*a4;
Rr= s0*(s2-(s1+s3));
title( 'Radiation Resistance')
xlabel( 'Height (wavelength)')
ylabel ('Radiation Resistance(Ohm)')
plot(h,Rr,'k');

THIS IS MY CODE BUT IT KEEPS GIVING ME THIS

help plzzz
 
Last edited by a moderator:

The l was a typing mistake i replaced it with 1
but i am still getting the same error
plus am getting an empty window of the graph with only the title
please tell me how can i fix this
 

No error, a single point at h=2 in the plot window. As requested by the code, I think.
 

no the code should give a graph and not a point
it worked with my frnd on her laptop
and we only have diff values of h
but y is mine not working
can you please try it
 

h is set to 2 and never modified. How should the code plot a graph for different h values?
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…