Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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

Status
Not open for further replies.

Tima987

Newbie level 4
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
plot(h,Rr,'k');Error: unable to resolve syms to a function call
--> plot(h,Rr,'k');Error: Undefined function or variable k
--> plot(h,Rr,'k');Error: Undefined function or variable k
--> plot(h,Rr,'k');Error: Undefined function or variable k
--> plot(h,Rr,'k');Error: Undefined function or variable v2
--> plot(h,Rr,'k');Error: Undefined function or variable v1
--> plot(h,Rr,'k');Error: Undefined function or variable v4
--> plot(h,Rr,'k');Error: Undefined function or variable k
--> plot(h,Rr,'k');Error: Undefined function or variable s1
--> plot(h,Rr,'k');Error: Undefined function or variable a2
--> plot(h,Rr,'k');Error: Undefined function or variable a4
--> plot(h,Rr,'k');Error: Undefined function or variable s2
--> plot(h,Rr,'k');

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 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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top