Plotting the following equation L=((N^2)*muo*Ag1)/(x+((g*R)/(2*h)))
Show older comments
I am new to matlab and need help plotting the following equation L=((N^2)*muo*Ag1)/(x+((g*R)/(2*h))) against x where x varies from xmin to xmax in steps of 0.0001m.
My parameters are as follows: R=0.065; h=0.0319; g=0.00055; xmin=0.0011; xmax=0.0187; N=2470; muo=4*pi*1e-7; Ag1=pi*R^2;
I have tried the following code with no luck: x=[xmin:0.0011:xmax] plot=(x*1000,L);xlabel=('position x (mm)'); x is multiplied by 1000 here to get value of x in mm rather than in m which are used in the equations.
Any help appreciated.
Regards
Mark
Accepted Answer
More Answers (1)
Mark McGrath
on 11 Nov 2017
0 votes
1 Comment
Star Strider
on 11 Nov 2017
As always, my pleasure.
You weren’t ‘going wrong’. Forgetting to vectorise the division seems to be a frequent problem. I’ve seen it several times in the last few days.
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!