Hi, I'm working on an analytical assignment and want to find a pressure value that corresponds with a certain value of a. So i tired to create a for loop that determines Pc (my pressure component) for different values of a. Then I wanted to find which of those values for Pc that fits with my other equation (in the if-loop) but I keep getting errors. I've posted my code below, do you have any suggestions on how I can make this work?
clear
clf
clc
Pi=200*10^6
b=0.15
sy=250*10^6
dt=0.001
for a=0:dt:0.124
Pc=[0.0433884298*(b^2)*Pi*(1-a^2)]/(b^2-a^2)
if
sy==[(Pi*((b^2)+a(^2)))/(((b^2)-a(^2)))-[(2*Pc*1.21*a^2)/(0.21*a^2)]
print('works')
end
end

답변 (0개)

카테고리

도움말 센터File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

질문:

2013년 10월 2일

편집:

2013년 10월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by