Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
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
Solved! Go to Solution.
Hi Greg,
Please attach your Prime Worksheet. That saves us from retyping.
Success!
Luc
Hi Luc,
Thanks for your reply. Please see attached file.
Greg
Thanks a lot
Greg
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
Thanks
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
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