solución de ecuaciones ni lineales en matlab
Publicado por camilo ortega (1 intervención) el 28/04/2018 16:03:03
buenos días, estuve tratando de resolver un problema de múltiples ecuaciones por matlab, pero me arroja errores, quisiera saber si alguno podría ayudarme ; he probado por dos métodos:
método 1:
syms fr1 fr2 fr3 k1 k2 k3 V1 V2 V3 f1 f2 f3 hl1 hl2 hl3
ec1='hl1=(fr1*(100/0.05)+k1)*(V1^2/2*9.8)';
ec2='hl2=(fr2*(150/0.06)+k2)*(V2^2/2*9.8)';
ec3='hl3=(fr3*(80/0.04)+k3)*(V3^2/2*9.8)';
ec4='f1=(25/(log((1/(3.7*333.33))+(5.74/(Nr1^0.9))))^2)';
ec5='f2=(25/(log((1/(3.7*500))+(5.74/(Nr2^0.9))))^2)';
ec6='f3=(25/(log((1/(3.7*200))+(5.74/(Nr3^0.9))))^2)';
ec7='Nr1=((V1*0.05*1000)/0.001003)';
ec8='Nr2=((V2*0.06*1000)/0.001003)';
ec9='Nr3=((V3*0.04*1000)/0.001003)';
ec10='V1*0.05^2=V2*0.06^2';
ec11='V1*0.05^2=V3*0.04^2';
ec12='V2*0.06^2=V3*0.04^2';
[fr1,fr2,fr3,k1,k2,k3,V1,V2,V3,f1,f2,f3]=solve(ec1,ec2,ec3,ec4,ec5,ec6,ec7,ec8,ec9,ec10,ec11,ec12,'fr1,fr2,fr3,k1,k2,k3,V1,V2,V3,f1,f2,f3')
método 2:
syms fr1 fr2 fr3 k1 k2 k3 V1 V2 V3 f1 f2 f3 hl1 hl2 hl3 real;
[fr1,fr2,fr3,k1,k2,k3,V1,V2,V3,f1,f2,f3]=solve('hl1=(fr1*(100/0.05)+k1)*(V1^2/2*9.8)','hl2=(fr2*(150/0.06)+k2)*(V2^2/2*9.8)','hl3=(fr3*(80/0.04)+k3)*(V3^2/2*9.8)','f1=(25/(log((1/(3.7*333.33))+(5.74/(Nr1^0.9))))^2)','f2=(25/(log((1/(3.7*500))+(5.74/(Nr2^0.9))))^2)','f3=(25/(log((1/(3.7*200))+(5.74/(Nr3^0.9))))^2)','Nr1=((V1*0.05*1000)/0.001003)','Nr2=((V2*0.06*1000)/0.001003)','Nr3=((V3*0.04*1000)/0.001003)','V1*0.05^2=V2*0.06^2','V1*0.05^2=V3*0.04^2','V2*0.06^2=V3*0.04^2')
método 1:
syms fr1 fr2 fr3 k1 k2 k3 V1 V2 V3 f1 f2 f3 hl1 hl2 hl3
ec1='hl1=(fr1*(100/0.05)+k1)*(V1^2/2*9.8)';
ec2='hl2=(fr2*(150/0.06)+k2)*(V2^2/2*9.8)';
ec3='hl3=(fr3*(80/0.04)+k3)*(V3^2/2*9.8)';
ec4='f1=(25/(log((1/(3.7*333.33))+(5.74/(Nr1^0.9))))^2)';
ec5='f2=(25/(log((1/(3.7*500))+(5.74/(Nr2^0.9))))^2)';
ec6='f3=(25/(log((1/(3.7*200))+(5.74/(Nr3^0.9))))^2)';
ec7='Nr1=((V1*0.05*1000)/0.001003)';
ec8='Nr2=((V2*0.06*1000)/0.001003)';
ec9='Nr3=((V3*0.04*1000)/0.001003)';
ec10='V1*0.05^2=V2*0.06^2';
ec11='V1*0.05^2=V3*0.04^2';
ec12='V2*0.06^2=V3*0.04^2';
[fr1,fr2,fr3,k1,k2,k3,V1,V2,V3,f1,f2,f3]=solve(ec1,ec2,ec3,ec4,ec5,ec6,ec7,ec8,ec9,ec10,ec11,ec12,'fr1,fr2,fr3,k1,k2,k3,V1,V2,V3,f1,f2,f3')
método 2:
syms fr1 fr2 fr3 k1 k2 k3 V1 V2 V3 f1 f2 f3 hl1 hl2 hl3 real;
[fr1,fr2,fr3,k1,k2,k3,V1,V2,V3,f1,f2,f3]=solve('hl1=(fr1*(100/0.05)+k1)*(V1^2/2*9.8)','hl2=(fr2*(150/0.06)+k2)*(V2^2/2*9.8)','hl3=(fr3*(80/0.04)+k3)*(V3^2/2*9.8)','f1=(25/(log((1/(3.7*333.33))+(5.74/(Nr1^0.9))))^2)','f2=(25/(log((1/(3.7*500))+(5.74/(Nr2^0.9))))^2)','f3=(25/(log((1/(3.7*200))+(5.74/(Nr3^0.9))))^2)','Nr1=((V1*0.05*1000)/0.001003)','Nr2=((V2*0.06*1000)/0.001003)','Nr3=((V3*0.04*1000)/0.001003)','V1*0.05^2=V2*0.06^2','V1*0.05^2=V3*0.04^2','V2*0.06^2=V3*0.04^2')
Valora esta pregunta
0