
How to plot Efficiency maps
141 ビュー (過去 30 日間)
古いコメントを表示
I am trying to plot the efficiency map using a contour function for the torque speed curve shown below. the problem is, the contour function, plots for the whole surface of the matrix. But i only want the contour plot to be under the torque speed curve so that the part above the torque speed curve is white.
the link below is a link of the torque speed curve. any help would be much appreciated
0 件のコメント
回答 (3 件)
Junfei Tang
2016 年 2 月 4 日
編集済み: Junfei Tang
2016 年 2 月 4 日
Hi,
Before creating the efficiency map, I think you already have a set of coordinates (x,y) and the corresponding values (z), i.e. the efficiencies. Then you need to put all the x-axis values together, all the y-axis values together and all the z-axis values together to form matrices:
X = [ X(1,1), X(1,2), X(1,3), ..., X(1,n);
X(2,1), X(2,2), X(2,3), ..., X(2,n);
...................................;
X(n,1), X(n,2), X(n,3), ..., X(n,n) ];
Y = [ Y(1,1), Y(1,2), Y(1,3), ..., Y(1,n);
Y(2,1), Y(2,2), Y(2,3), ..., Y(2,n);
...................................;
Y(n,1), Y(n,2), Y(n,3), ..., Y(n,n) ];
Z = [ Z(1,1), Z(1,2), Z(1,3), ..., Z(1,n);
Z(2,1), Z(2,2), Z(2,3), ..., Z(2,n);
...................................;
Z(n,1), Z(n,2), Z(n,3), ..., Z(n,n) ];
where X(x,y), Y(x,y) and Z(x,y) correspond to each other: x and y are the indices, X is the matrix containing the x-axis values, Y is the matrix containing the y-axis values and Z is the matrix containing the z-axis values, e.g. the efficiencies.
MATLAB will put the points on the map like this: MATLAB assigns Z(1,1) to be the z-axis value of point (X(1,1), Y(1,1)); then assigns Z(2,1) to be the z-axis value of point (X(2,1), Y(2,1)); ... until assigns Z(n,n) to be the z-axis value of point (X(n,n), Y(n,n)).
This is what I have done, since to form matrices is easier for me to check the values in a table format afterwards. However, I think if you create an array for each of X, Y and Z instead of creating a matrix for each of them, it should also work.
After the assignment of the values, start to create the figure:
figure
n = 100; % number of contour levels
efficiency_map = contourf(X,Y,Z);
colorbar;
xlabel('{\it\Omega}_r [rev/min]')
ylabel('{\itT}_e [N*m]')
legend
Then the efficiency map comes out:

0 件のコメント
Walter Roberson
2012 年 7 月 25 日
The points that you do not want plotted, set the Z value to NaN before doing the contour plot.
2 件のコメント
Can
2023 年 5 月 26 日
for example my efficiency value at Tork = 10nM^2 and rpm = 400 rev/min is 83,04 how will i assign these values to the X, Y and Z axis can you show me at one example with the values i give.
Ashu
2023 年 6 月 28 日
torque developed by the motor and efficiency against silip on the same graph, use left axis for torque and right for the efficiency. please how can i plot it
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Contour Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!