Plotting help, please?
显示 更早的评论
Ok, so I'be this program here I've got to do for a class, all of the things it asks for are done except one, the plotting part, it's a program that calculates the angle of the position of bars 3 and 4 of a 4 bar mechanism, the thing is, I have to plot the answer to both of those angles for all 360 degrees, and when I do that, all it does is tell me it will ignore all complex numbers, and 4 horizontal lines were plotted (each angle has two possible answers), then I decided since it would ignore the complex numbers I'd just plot the absolute value for the angles, and after doing that it only plotted two angles, yet still they were completely horizontal, does anybody think they could look at that part of my code and help me find out what's wrong?
Here's the pastebin of my code (excuse the spanish, but I guess you can still understand the variables and such, also, variables suck as k1, k2..etc are already defined before this bit): http://pastebin.com/ziyxcAHy
采纳的回答
更多回答(1 个)
bym
2011-8-21
you might try using the function
atan2()
instead of
atan()
otherwise, please provide values for k1..k5 so the program will run
类别
在 帮助中心 和 File Exchange 中查找有关 Graphics Objects 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!