Skip to main content
1-Visitor
March 22, 2021
Question

Vector or for loop?

  • March 22, 2021
  • 4 replies
  • 3880 views

Help a Mathcad-beginner out! 

 

I have programmed a design-model for bending of one single cross-section for a floor slab. I want to optimize this calculation-model to be able to calculate for several cross-sectional dimensions. My first idea was to vectorize the different values, but it wasn't as easy as i thought because of several dimension-errors.

 

What is the best solution to be able to compute this for all different combinations of cross-sectional dimensions (hw,bw,hf)?

 

LN_9876459_0-1616414946539.png

 

Regards, 
Lisa (Mathcad prime 6)

 

4 replies

23-Emerald IV
March 22, 2021

Your sheet contains a lot of data and information, so it's not clear (to me) what operations you are talking about.

 

At first glance, I think you cannot use vectorisation, so you need to program. But it depends heavily on the type of operations you need to perform and how many variables are into play.

LucMeekes_0-1616425545819.png

Success!
Luc

 

ttokoro
21-Topaz I
March 23, 2021

image.pngimage.pngimage.pngimage.pngimage.png

Instead of V, you can use the function you want to optimize. Then find the maximum or minimum you want.

t.t.
1-Visitor
March 23, 2021

Hi, 

 

Thank you for the help.

This seems to be the solution i searched for. But, i get an error as below. Whats the problem? 

LN_9876459_0-1616503440150.png

 

ttokoro
21-Topaz I
March 23, 2021

Prime7 file attached.

t.t.
23-Emerald I
March 23, 2021

I've made a start, but this is a long, complicated sheet.

 

See if the attached Prime 6 file sheds any light.  (I got a far as the second moment of inertia.

23-Emerald I
March 23, 2021

Next iteration, up thru glue in Prime 6.0

1-Visitor
March 23, 2021

Hi, 

 

Thank you so much for the help and the effort!

23-Emerald I
March 24, 2021

It took some ingenuity, but the attached file (I believe) works thru your sheet and gets it all functioning correctly.

It's in Prime 6.0, and I think it would run in Express (I disabled the solve blocks and programs.