How to find value of large area based different values of small area?

1 view (last 30 days)
I am trying to find overall value of wind for large zone where sample points have small zonesand all them have individual values. Also, values depend on size of zones as well. Here, large zone falls partially on other 3 zone while fully on zone 1.
Pressure in zone 1 = P1, similarly pressure in other zones = P2, P3, P4
Yellow color area in zone 1 = A1, similarly yellow color area in other zones = A2, A3, A4; total yellow area (A)= A1+A2+A3+A4
Equation should be this way for the Pressure of large zone ==> P = (P1A1 + P2A2 + P3A3 + P4A4) / A

Answers (1)

Zahrah Walid
Zahrah Walid on 9 Dec 2022
I'm not completely sure that I got your question but as far as I understand you want to implement this algorithm using MATLAB; if yes, this is a really easy task with various ways, for example if P1=100, P2=200, P3=300, A1=5, A2=10, and A3=15:
data=[100 5; 200 10; 300 15]; %constrcut n*2 matrix with pressures in first column and areas in second column
A=sum(data(:,2)); %total area
P=sum(data(:,1).*data(:,2))/A; %P = (P1A1 + P2A2 + P3A3 + P4A4) / A
  1 Comment
Jigar
Jigar on 9 Dec 2022
Hello Zahrah,
No. Overall area of yellow zone is known, and how much portion of that zone falls in other zones is not known. So I need to create code for that by which I can calculate pressure based on given equation.

Sign in to comment.

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!