Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
Hi Guys,
I'm new here and fresh with MathCad. I would be very grateful for help. I need a help with creating a matrix (15x15) which indicates distance between all floors. I have a table with height of each floor. Any suggestions?
Solved! Go to Solution.
Sir
Thank you very much for help. What exact function are those two vertical lines on sides of summation signs? Instead of just copy and paste, It would be god to understand the whole process.
Greg
Hi,
What exact function are those two vertical lines on sides of summation signs?
The vertical lines are to take the absolute value of what is between the lines
The file with the calculations has been uploaded not just cut and paste
Sir
Thanks once more. I have to calculate a time (t) for each of those distances (d) like in picture below. I'm trying to use "if" formula as on attached file. I have an error that the first value have to be scalar. Any idea how I could implement this function and create another matrix with results?
Hi,
You were correct in the use of the if functions
It is necessary to index d the matrix to get d[i,y each scalar element of d. This is the source of the error message.
Enclosed file calculates the time and puts them in a matrix.
Thanks a lot for help.
I really appreciate this
There's a problem in your middle equation for time! (One of the reasons I use Mathcad is because of the units; when units don't balance there's a problem that needs to be investigated!)
See attached!
Sir,
Thank you very much for spotting it. I have taken those formulas from one of the journals related to elevators. I will inform my tutor regarding it and show him that there is an issue with units.
I have to calculate a probability of journey between floor i and j using the below formula, however MathCad indicates that my value "i" must be scalar or a matrix. Any help regarding this?
I'm attaching as well a case study which exactly I'm working on and my worksheet
I would be very grateful for help
Concerning the unit mismatch which Fred noted, the error in formula (5) in the screenshot you posted here
https://community.ptc.com/t5/Mathcad/Distance-between-floors-matrix/m-p/814280/highlight/true#M202215
is now quite obvious - especially if you look at formula (8) in the pdf you just posted.
In formula (5) mentioned above is should read
Note that the last "j" in the denominator is NOT under the root!
Thank you very much. How did you spot that is causing a unit mismatch?
@GP_10383074 wrote:
Thank you very much. How did you spot that is causing a unit mismatch?
I didn't, Fred did!
As he already wrote its one of the major benefits of Mathcad and Prime that it can naturally deal with units and will choke on formulas which are not unit balanced.
So its normally a good idea to add the correct units. You can run into problems doing so if the formulas you use are empirical formulas meant to be used without units - you would have to use them unitless in Prime as well.
Here is an example where you can see that Prime flags the unit error in case the wrong formula is used (but Fred already had shown something similar in his posting):
BTW, the error you get when you try to calculate the probabilities is because the variable "i" you use in your sums is not a scalar but a range (0..15).
What kind of structure did you expect PJ to be?
You used x and y when defining PJ, but the RHS of the definition is not using x or y.
Your sums run from i or i+1 up to j or j-1, but j was set to 1 before. Was this done on purpose?
I am not sure about the meaning of i and j in the formula (17) you posted.
Thank you. Btw, do you know why my value "i" is creating an error and I cannot create matrix?
See the comments I added in my last answer.
Maybe you meant to use i and r instead of x and y on the LHS ?
Thanks for your answer. I have to look a bit deeper into it.
With Werner's correction to the time equation. Also, solving from first principles assuming deceleration mirrors acceleration.