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

Vector or for loop?

LN_9876459
Visitor

Vector or for loop?

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)

 

11 REPLIES 11

Re: Vector or for loop?

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

 

Re: Vector or for loop?

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.

Tags (1)

Re: Vector or for loop?

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

 

Re: Vector or for loop?

Prime7 file attached.

Tags (1)

Re: Vector or for loop?

Hi,

Thank you for the help, but is it possible for you to send a printscreen? Im using Prime 6, so i can´t open the file.

 

thanks, 

Lisa

 

 

Re: Vector or for loop?

Your On may be O ctrl+- n, but it should be O [ n, therefore n is index of vector O. 

image.pngimage.png 

Re: Vector or for loop?

don't vectorize here

Re: Vector or for loop?

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.

Re: Vector or for loop?

Next iteration, up thru glue in Prime 6.0

Re: Vector or for loop?

Hi, 

 

Thank you so much for the help and the effort!

Re: Vector or for loop?

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.

Announcements
Check out the latest
Mathcad Tip
"PTC Mathcad 15 / Prime 1-6 Update."