Assuming you have the necessary data to create an efficiency map of the DC motor, you can follow these steps:
surf()
function in MATLAB to plot the efficiency map, with torque on the y-axis, speed rpm on the x-axis, and efficiency as the z-axis.Here's some example code:
main.m427 chars17 lines
Replace calculate_efficiency()
with your actual function that calculates the efficiency value. The code above assumes that the function takes two arguments: torque and speed, and returns the corresponding efficiency value.
gistlibby LogSnag