Community Tip - You can change your system assigned username to something more personal in your community settings. X
I have two problems defining the spectrum:
1. Acceleration spectrum
2. Displacement spectrum
I tried to replicate it in Mathcad 11 without success. I followed an example created in Mathcad 13, which includes the Boolean function formulations, but the program detected errors because some variables are not defined, preventing me from graphing them.
Please clarify what I'm doing wrong.
Solved! Go to Solution.
I guess second hypothesis means you second try to duplicate the function Sa from the MC13 screenshot.
Your first try was the best anyway. Because you used units (a good idea as this is one of the strengths of Mathcad and also Prime) you have to use 2.4 s instead of just 2.4 as Luc already stated.
And you can/should plot the function Sa(t) and not define another one where all the used variables are unknown. Variables you define inside a program (like RW and C) ar known only local inside the program but not at worksheet level.
More mistakes in the definition of Sd. You have to define/assign RW and C in the same way as in your function Sa using local assignments. Just writing the variable name below the comparisons can't work. Once you do that and add the unit for the value 2.4 you are again up and running.
You don't need to use RW and C as arguments of your function. After all you don't intend to provide values when you call the function, don't you? You simply provide a time value, nothing more.
I changed the name of the used time argument from uppercase T as you did to lowercase t, but this would in no way have been necessary. The name of the formal function argument does not matter at all. The range T you define is and should be only used for the plots.
Prime 11 sheet attached
It's good that you state which version of Prime you use.
But you should (whenever possible) ALWAYS attach the worksheet.
Have you tried using the converter (built into Prime 11) to convert the sheet from Mathcad 13 to Prime 11?
The variable R.W is unknown in all those places because it only exists within the program(s).
So you cannot use it to evaluate expressions on sheet level.
Success!
Luc
Check your units.
In the first S.a program you are comparing the parameter t with 2.4, so t should be unitless. But in the next if-statement you are comparing 2.5*Tp/t with 2.5, so t must have the same unit as Tp (who has s as a unit.)
Correct these errors and try to evaluate S.a(1*s)
As said, the variable R.W is unknown at sheet level, so your definition of S.a_E.030(t) must fail. Also C is unknown at sheet level.
Success!
Luc
Why don't you attach the Mathcad 13 worksheet (which obviously is legacy Mathcad) and your attempt in Prime 11.
All can say from the pictures is that Rw is never assigned a value so you can't use it in numerical calculations.
Rw is only locally assigned a value in the first function Sa(t) but you don't use this function for evaluating a value.
I'm not attaching version 13 because it's just a screenshot of a PDF file.
I guess second hypothesis means you second try to duplicate the function Sa from the MC13 screenshot.
Your first try was the best anyway. Because you used units (a good idea as this is one of the strengths of Mathcad and also Prime) you have to use 2.4 s instead of just 2.4 as Luc already stated.
And you can/should plot the function Sa(t) and not define another one where all the used variables are unknown. Variables you define inside a program (like RW and C) ar known only local inside the program but not at worksheet level.
More mistakes in the definition of Sd. You have to define/assign RW and C in the same way as in your function Sa using local assignments. Just writing the variable name below the comparisons can't work. Once you do that and add the unit for the value 2.4 you are again up and running.
You don't need to use RW and C as arguments of your function. After all you don't intend to provide values when you call the function, don't you? You simply provide a time value, nothing more.
I changed the name of the used time argument from uppercase T as you did to lowercase t, but this would in no way have been necessary. The name of the formal function argument does not matter at all. The range T you define is and should be only used for the plots.
Prime 11 sheet attached
Dear Werner E, your analysis is excellent. However, I'd like to ask how I obtain the sa and sd values?
Regards
@pannus0 wrote:
Dear Werner E, your analysis is excellent. However, I'd like to ask how I obtain the sa and sd values?
Regards
Not sure if I understand what you mean. To get the values you simply use sa and sd as fuctions. By this I mean you provide an argument (time value) and get the desired value:
In case you need a table of multiple values I would suggest that you create a vector of time values (not using the range T as a range is quite different from a vector).
Prime 11 offers a nice new function "vec" to quickly create a vector.
It is necessary to vectorize (the arrow over the expression, see the "operators" menu) the function call.
Ahh, and what you see in the picture above will not work for you because of a division by zero when the argument is 0s.
i changed the condition for the calculation of C in both programs and also the last expression in S.d to make it work OK for 0s as well:
Thank you very much!
