Plotting the following equation L=((N^2)*muo*Ag1)/(x+((g*R)/(2*h)))
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (1)
Mark McGrath
el 11 de Nov. de 2017
0 votos
1 comentario
Star Strider
el 11 de Nov. de 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.
Categorías
Más información sobre Annotations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!