How to plot 2 coef in matlab to show their relation to each other for specefiec interval -


i've 2 coefficient (ki , kp)

enter image description here

how can plot ki(y axes) , kp(x axes) shows relation each other in 2 axes plot in matlab interval w =(0 , 0.4)?

you have to:

  • define omega data range

  • implement equation of 2 coefficients kp , ki. have make usre use notation

    • ./, .*, .^ perform these operations on arrays element-wise
  • use plot plot ki=f(kp) on omega interval

a possible implementation be:

% define omega data omega=0:.01:0.4; % evalaute kp on omega range kp=(38.6068*omega.^2-0.37)./(0.1288*omega.^2+0.1369); % evalaute ki on omega range (also using kp coeff.) ki=(18.58-0.3589*kp).*omega.^2/0.37; % plot data: %   x data: kp %   y data: ki plot(kp,ki,'r','linewidth',2) grid on % define x axis label xlabel('coeff. kp','fontweight','bold') % define y axis label ylabel('coeff. ki','fontweight','bold') % define title title('ki=f(kp) - \omega=[0:0.4]','fontweight','bold') figure plot(omega,kp,'r','linewidth',2) hold on plot(omega,ki,'b','linewidth',2) grid on legend('kp','ki','location','best') xlabel('\omega','fontweight','bold','fontsize',20) 

enter image description here

enter image description here

hope helps.

qapla'


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -