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

We are troubleshooting an issue impacting community login, and it may be intermittently unavailable. Sorry for any inconvenience.

Distance between floors matrix

GP_10383074
7-Bedrock

Distance between floors matrix

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? 

 

Screenshot 2022-08-20 at 10.37.21.png

ACCEPTED SOLUTION

Accepted Solutions

Hi

Does this look OK

Capture.JPG

View solution in original post

15 REPLIES 15

Hi

Does this look OK

Capture.JPG

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

Capture.JPG

Capture2.JPG

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?

 

Screenshot 2022-08-20 at 13.02.42.png

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!)

Fred_Kohlhepp_0-1660999894449.png

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

Screenshot 2022-08-20 at 17.40.59.png

I would be very grateful for help

 

Werner_E
25-Diamond I
(To:GP_10383074)

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

Werner_E_0-1661016955092.png

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?

Werner_E
25-Diamond I
(To:GP_10383074)


@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):

Werner_E_0-1661018883746.png

 

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?

 

 

Screenshot 2022-08-20 at 21.14.35.png

Werner_E
25-Diamond I
(To:GP_10383074)

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.

Announcements

Top Tags