cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

7-Bedrock

## Probability

Hi Guys,

I'm doing assignment related to passenger transit probability which indicates the probability that a passenger chooses to travel from floor ''i'' to the floor ''j''. This is only 4 floor building.

''P_arr'' is an arrival rate on each floor and ''U'' is a dedicated population on each floor.

This is a formula which I have to use.

And this is my initial matrix from Word for calculation's

Does anyone know how to create a matrix 4x4 like below from vector ''U'' and vector ''P_arr"?

This is actual case study from one of journals and there are results for this if this helps a bit

I would be very grateful for help

Greg

1 ACCEPTED SOLUTION

Accepted Solutions
23-Emerald III
(To:GP_10383074)

See attached file.

Success!
Luc

8 REPLIES 8
23-Emerald III
(To:GP_10383074)

Hi Greg,

Success!
Luc

7-Bedrock
(To:LucMeekes)

Hi Luc,

Greg

23-Emerald III
(To:GP_10383074)

See attached file.

Success!
Luc

7-Bedrock
(To:LucMeekes)

Thanks a lot

Greg

23-Emerald III
(To:LucMeekes)

Or, as long as you keep the vectors P.arr and U the same size, you can do without the explicit indexing:

and with that  you can:

Note that you cannot assemble it into a single expression, due to the vectorization(s) needed.

Success!
Luc

7-Bedrock
(To:LucMeekes)

Thanks

7-Bedrock
(To:GP_10383074)

Hi,

I have another quick question related to probability.

For this calculations I have to use "r" (length of travel in floor length) only from first row (i=0) and vector "U" (population on each floor).

For some reason I have an error, any advice??

Greg

23-Emerald III
(To:GP_10383074)

For not just some, but an obvious reason.

Your r[0, j vector contains the values 0 through 14, and you let the summation run up to r[0, j -1 .

The first time, for j=0, that results in r[0, j-1 = -1, while your ORIGIN=0.

You're trying to index the array U at -1, while its index starts at 0, hence the index is illegal.

Success!
Luc

Announcements
Top Tags