How do I give a value to a function and map an interval/it's path?
5 ビュー (過去 30 日間)
古いコメントを表示
For a school assignment, I need to determine whether my function goes over the tip at a curve at a certain value.
So I currently have this plot:
Which is the function:
Pi_c = max(1,1+(2*Nref-1)*(3-2*Mc/Nref).*(Mc/Nref).^2);
What I want to do is to put in:
Nref = 8
Mc = 10.8
To determine whether goes past the tipping point and just manually plot it's path on the curve.
A good example is this:
So basically I want to plot lines from one x-coordinate to another on the curve (and give it any color).
I know I'm making myself look stupid by how simple it is, but I'm totally new to matlab and really don't know what to do. Can anyone help me out?
Below is my script:
clear all;
close all;
%% Compressor characteristic
for Nref = 1:10;
Mc = [-2:0.01:15];
Pi_c = max(1,1+(2*Nref-1)*(3-2*Mc/Nref).*(Mc/Nref).^2);
MsNref(Nref,:)=Mc;
PrNref(Nref,:)=Pi_c;
end
plot(MsNref',PrNref','k')
axis([-2 15 1 20])
xlabel('m_c')
ylabel('pressure ratio')
title('Simplified compressor characteristic')
hold on
pcolor(MmN,Pi_compN,max(0,P_net));
title('Mu_T= 2e-5')
axis 'square'
0 件のコメント
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!