c1=500+(5.3*p1)+(0.004*p1^2);
c2=400+(5.5*p2)+(0.006*p2^2);
c3=200+(5.8*p3)+(0.009*p3^2);
condition ,
p1+p2+p3=800
lambda=8.5
p1,p2,p3???

댓글 수: 2

James Tursa
James Tursa 2013년 10월 25일
What have you done so far?
student
student 2013년 10월 25일
basics

댓글을 달려면 로그인하십시오.

 채택된 답변

student
student 2013년 11월 16일

0 개 추천

clear; clc; format long; %syms p1 p2 p3 c1 c2 c3 p1i p2i p3i dc1 dc2 dc3 Pd=input('Total power delivered is:'); p1i=input('enter initial value of p1i :'); p2i=input('enter initial value of p2i :'); p3i=input('enter initial value of p3i :'); if(p1i+p2i+p3i==Pd) disp('initially Lambda is assumed to be zero')
c1=500+(5.3*p1i)+(0.004*p1i^2); c2=400+(5.5*p2i)+(0.006*p2i^2); c3=200+(5.8*p3i)+(0.009*p3i^2); disp('Differentiating c1,c2,c3:'); dc1=5.3+(0.08*p1i) dc2=5.5+(0.012*p2i) dc3=5.8+(0.018*p3i) disp('Substituting values of p1,p2,p3 in differentiated equations :') Sd1=(c1/dc1) Sd2=(c2/dc2) Sd3=(c3/dc3) Lambda=(800+(5.3/0.008)+(5.5/0.012)+(5.8/0.018))/((1/0.008)+(1/0.012)+(1/0.018)) p1=p1i-Sd1 p2=p2i-Sd2 p3=p3i-Sd3 disp('The X vector gives the value of p1,p2,p3,lambda:');
else disp('Total power deliverd & sum of pi1,pi2,pi3 is not equal'); disp('Please run the program again'); end

추가 답변 (0개)

태그

질문:

2013년 10월 25일

댓글:

2013년 11월 16일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by