Start a topic
With the exception of Windchill, The PTC Community is on read-only status until April 6 in preparation for moving our community to a new platform. Learn more here
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

The PTC Community is on temporary read only status in preparation for moving our community to a new platform. Learn more here

Translate the entire conversation x

3D plot managing by advanced input Slider feature in Prime 10.0.0

Ivan_Pat
13-Aquamarine

3D plot managing by advanced input Slider feature in Prime 10.0.0

Hi there!

I 'm trying to master the slider advanced control option to see how my goal function will be changed. On the PTC  support page, I have found only the 2-axis plot sample:

https://support.ptc.com/help/mathcad/r10.0/en/index.html#page/PTC_Mathcad_Help/example_slider.html#wwID0EIKIPB 

 

It looks like the upgraded version of Prime 10.0.0 probably has some bugs, or it is impossible to obtain such an option.

I've attached the function sample  (Prime 10.0.0), which I'd like to observe using the advanced control button (slider).

Any advice or assistance will be appreciated.

 

51 REPLIES 51

See your file returned.

 

It is simply the difference between dot product of two vectors by default, compared to element by element multiplication of two vectors.

Cheers

Terry

Thank you, Terry!

I have forgotten about the differences in vector and matrix products.

Now, the next obstacle has arisen: what if I want to use a table, like in the previous sample?
I find that there is no way to recall its rows and columns, as you did with the matrix (M) in the v7 file?

I mean that I want to make a workable calculation spreadsheet in compact form ( use matrices if possible).

So, is the laconic form of the formulae with only matrix integration possible? Or could tables also be the objects that are referred to?

In the attachment, my attempt to improve the form of the research spreadsheet. (v2).

 

Hi,,

To turn the table input that produces four column vectors into a matrix use the augment() command.

It places the four column vectors into a matrix side by side in the order you give the parameters.

Capture.JPG

Gives correct answer:

Capture2.JPG

Cheers

Terry

Hi,

Here is the graphs working

Thank you for your patience and attention, Terry!

 

I really don't want to be the geek who sores you each time with different issues, but I randomly figured out that the same initial data yields different f-values: in v9 it is almost 10 times larger than it should be (v7). The comparison of min(f) values also shows differences. I can't catch what trick is here.

Both files are attached to the letter.
I guess the problem is with the v9, but I cannot point out exactly.

Hi,

This one took some time.

First I made the graphs using Minp matrix into single_layer_k1 and single_layer_f to see if this worked.  It did.

Also created an f_root function based on Minp.

Capture3.JPG

Also changed the root equations so they depend on Minp only

Capture4.jpg

 

This made the file entirely dependent on Minp on the right hand side of calculations.  It works

 

So the problem must have occurred in the left side of calculations in v9 file

It turns out the equation for f() depends on u_value.  u_value in turn depends on the d of the segments of the wall.

Changed the u_value equation to reflect this dependency on d.

Capture.JPG

Now need to append equation of f() to reflect change in equation u_value(d,Lambda)

Capture2.JPG

This version of f() produces the correct results as u_value also updates based on d

 

Cheers

Terry

 

 

As always, I want to thank you, Terry, for your patience and willingness to help! 
I just can't figure out how MatchCAD understands d1, d2, d3, (when we calculate k1 and f on the left hand) and so on, if we didn't assign them to any variable???  

Hi,

I just can't figure out how MatchCAD understands d1, d2, d3, (when we calculate k1 and f on the left hand) and so on, if we didn't assign them to any variable???  

 

Its a good question so I will hopefully explain it.  Expression below is the definition of function f()

Capture.JPG

In the definition of f() function above on left hand side d1,d2,d3, Delta1,2,3, and Lamda1,2,3 are parameters local to the function only not variables of the worksheet.

The parameters are used in the function definition as parameters on left and also on the right hand side to define what to do with those parameters.

 

You could use for instance dA,dB,dC that are not variables in the worksheet but parameters used in the definition of the function on both sides.

dA,dB,dC below and d1,d2,d3 above are in local scope to the function definition only.   The parameters could be named anything as long as they are consistent on either side of the definition. No calculation takes place, just definition. 

Capture3.JPG

 

The function does not calculate anything when its defined only when its used.

When the function is used the parameters to the function are replaced with actual worksheet variables.  Matched to the list of parameters.

The function knows what to do with the provided worksheet variables because of its definition and the local scope parameters in the definition.  Using the function is where the calculation happens with defined worksheet variables.

 

Capture2.JPG

 

Here is the confusion:

It is possible to have a worksheet variable called "x" and any number of local scope parameters called "x" in a number of function definitions.

The local scope parameters "x" are used on both sides of function definitions.  the local scope parameters "x" are not the worksheet variable "x".

When the function is used you could use the worksheet variable "x" in the call to that function.

 

Hope this helps

Terry

Hi Terry!

Thank you for the comprehensive explanation of the issue. 
As far as I understand, no matter what characters you pass to the function, the point is the correct execution of the function's algorithm after recalling it with specific inputs, which can differ from the initial characters of the function expression (left and right sides). 🙂

Capture.JPG

Hi Terry!

As always, you provide the exact solution and a qualified explanation of the particular issues that arose in my research.

Thank you so much for your patience and desire to assist with specific topics.  

Ivan_Pat
13-Aquamarine
(To:Ivan_Pat)

@terryhendicott 
Hi Terry!
I have found out that in the v10 file, namely in  single_layer_k1 and single_layer_f functions, there are no direct references to d[0], d[1] or d[2] variables in the assignment  M[xi]←k1_2 M(new) (last row of single_layer_k1  and single_layer_f functions). As far as I understand, we did such an assignment, for instance, in the v9 version of this calculus.  I tried to research the plots of k_1 and f, and only figured that, among the variables d[0], d[1], and d[2], only d[1] was on the plot path. From this point, I can assume that M[xi] reflects all the variables incrementing from x to wall_w2 simultaneously in the k_1 function. 
At least, this is only the reason that arose in my head for such a d[0] and d[2] plot path mismatching explanation...

I picked both files, v9 and v10, for the comparison.

I'll be very grateful for your clarification of my question, Terry!

Hi

v9 does not get answer as u_value needs to be a function of depth.

v9

Capture.JPG

Capture2.JPG

v10

Capture6.JPG

Capture5.JPG

Cleaned up v9

 

Cheers

Terry

 

Hi Terry!

Thank you for the clear explanation of the issue.

It's probably my fault for not expressing myself more clearly, but the question I wanted to ask was other than you replied.

In the attached file, sensitive questioned point are shaded in pink.

Hi Ivan,

Have added a variable "n" for the layer number to operate on by varying chosen layers thickness.

It is zero based numbering. Either n= 0, 1, or 2 for a 3 layer system etc.

Have added notes in light blue.

 

Adding "n" has meant some alterations to functions.

 

Cheers

Terry

Hi,

Opened all the collapsed ares

Hi Terry!

Thank you very much for your contribution to resolving the issue I faced.
You make my day. I played with the plots like a child, evaluating the tool power.🙏🙏🙏

 

@terryhendicottThis is a Pretty cool and simple explanation,  as everything ingenious is simple! Thank you very much, Terry!!!

ttokoro
21-Topaz I
(To:Ivan_Pat)

image.png

Ivan_Pat
13-Aquamarine
(To:ttokoro)

@ttokoro Thanks a lot for your assistance with a clear example

ttokoro
21-Topaz I
(To:ttokoro)

image.pngWorksheet attached.

ttokoro
21-Topaz I
(To:ttokoro)

image.png

Announcements


Top Tags