Hi, I have data in the form: rpm Torque 1000 36 2000 40 3000 45 4000 50 . . I need to find the torque at a specific rpm. I found numpy.interp() which will give me a linear interpolation, but my tutor said it wouldn't be accurate enough. I found numpy.polyfit() which would be sufficient, but I can't seem to get a specific output e.g. for rpm = 12, torque = 37. I can only find: [CODE]x = np.array([0.0, 1.0, 2.0, 3.0, 4.0, 5.0]) y = np.array([0.0, 0.8, 0.9, 0.1, -0.8, -1.0]) z = np.polyfit(x, y, 3) print z [/CODE] … |
+0 forum
2 | ||

So, I've been assigned to write a program that reads the wind-tunnel test data, that of which is called the "tunnel.dat" in my program, and then allows the user to enter a flight-path angle. If the angle entered is within the bounds of the data set, the program would need to do linear interpolation to compute the corresponding coefficient of lift, given by f_b = f_a + ((b-a)/(a-c)) * (f_c - f_a) The problem I'm having is that the program has successfully compiled, however the result isn't turning out as it should be. It's returning "The coefficient of lift is … |
+0 forum
7 | ||

I've been working hard all day to get this to work. I'm playing around with the math module in python. I eventually want the following code to help me control the speed of a servo motor. The idea is to get the servo speed to accelerate and then decelerate as it reaches its set position--in a parabolic way you might say. The problem is I'm getting wavy numbers apparently from the algorithm I've set up and it needs to be a nice smooth transition. [CODE=Python]from __future__ import division import math import time def Interpolation(): EffectPercentage = 1 Step = 1 … |
+0 forum
2 | ||

Hi all, Ok, a little bit of background before I start. I am working on some 2D visualisation software to show a cross-section of a magnet yoke with colour coded sections showing the force. The diagram has 10 discrete colour sections, not a continuous blend of colour. The data I get from the experiment is formatted awkwardly and unfortunately this cannot be changed. I get an array of facets each with 8 x,y points. Each point has a force intensity value. The facet is formatted like this: [CODE]0 7 6 1 5 2 3 4[/CODE] However the mesh is not … |
+0 forum
0 |

The End.