看板 MATLAB 關於我們 聯絡資訊
function fuckU x=fsolve(@myfun,[128 105 104 52]); plot(x,'o','linewidth',10) set(gca,'Xtick',[1:4],'XTickLabel',{'P1','P2','P3','P4'}) xlabel('各處') ylabel('壓力') title('各處之壓力') grid on function F=myfun(P) F(1)=0.3*sqrt(500-P(1))-0.2*sqrt(P(1)-P(2))-0.2*(P(1)-P(3)); F(2)=0.2*sqrt(P(1)-P(2))-0.1*sqrt(P(2)-P(4))-0.2*sqrt(P(2)-P(3)); F(3)=0.1*sqrt(P(1)-P(3))+0.2*sqrt(P(2)-P(3))-0.1*sqrt(P(3)-P(4)); F(4)=0.1*sqrt(P(2)-P(4))+0.1*sqrt(P(3)-P(4))-0.2*sqrt(P(4)); -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 60.250.64.98 ※ 文章網址: https://www.ptt.cc/bbs/MATLAB/M.1477328288.A.021.html