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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

IMPRODCT & IMSUM

BG_9641770
11-Garnet

IMPRODCT & IMSUM

Hi guys, i have some complex IMPRODUCT combined with some if statements within excel. I have inserted and excel element into mathcad. I am trying to strip out the excel elements and cant see to find the mathcad version of these excel functions.

 

sheet is attached 🙂 

 

thanks guys  

1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

The engineering solution is to simply use a solve block:  The sample problem with units.

Capture.JPG

View solution in original post

14 REPLIES 14

I can't read Prime 7 files, but you should not need any special function to calculate the sum or product of imaginary numbers because Prime can natively  deal with non-real numbers - just use + and * or, if you have to deal with vectors of numbers, use the sum (Sigma) or product (Pi) operator.

LucMeekes
23-Emerald III
(To:Werner_E)

Here goes...

You can find the PDF version of this worksheet in attachment.

Thanks to Luc and Vladimir for providing help in reading P7 files. Lucs converted sheet was essential as we don't see the Excel-formulas in the pdf.

Maybe Luc one day reveals the secret about converting Prime sheets to lower versions 😉

 

You wrote " i have some complex IMPRODUCT combined with some if statements within excel"
I couldn't spot any if statements in the Excel sheet !?

As I already wrote, no special functions are necessary. Simply use regular math notation for sums, products and powers.

The hard part (as usual) is to read and understand the formula in the Excel cells.

As an example I have done the formula for the value in cell C2:

Werner_E_0-1636132282251.png

 

Once you got rid of the Excel component you also may want to add units, one of the benefits of using Mathcad or Prime.

 

For the calculations done in cells G2 and G3 you'll have to use Primes "Re(...)" function to extract the the real part of a complex number.

The numbers in your sheet don't result in non-real values and so the special functions in Excel would not be necessary. But I did not look closer and maybe with other input values the calculations may result in non-real numbers.

Werner_E_0-1636132978966.png

 


@Werner_E wrote:

 

Maybe Luc one day reveals the secret about converting Prime sheets to lower versions 😉

 


I think it just copies regions from file to file.


@VladimirN wrote:

@Werner_E wrote:

 

Maybe Luc one day reveals the secret about converting Prime sheets to lower versions 😉

 


I think it just copies regions from file to file.


I gave that a try some time ago to convert a Prime 6 file to Prime 4 format, but I would have to copy only one region at a time, which sure would be too laborious. Trying to copy multiple regions in one go failed with an error and also putting a couple of regions in a collapsed area and trying to copy this area did not work, even though somebody posted that it should work.

DJF
16-Pearl
16-Pearl
(To:Werner_E)

>Maybe Luc one day reveals the secret about converting Prime sheets to lower versions

 

reminder, it can be done.

https://community.ptc.com/t5/PTC-Mathcad/Prime-backwards-compatibility-solved-Or-at-least-hacked/m-p/637537

 

Edit:  hmmm.  looks like 7 changed it up.  So not sure if there is still a workaround.  

Werner_E
24-Ruby V
(To:DJF)


@DJF wrote:

>Maybe Luc one day reveals the secret about converting Prime sheets to lower versions

 

reminder, it can be done.

https://community.ptc.com/t5/PTC-Mathcad/Prime-backwards-compatibility-solved-Or-at-least-hacked/m-p/637537

 

Edit:  hmmm.  looks like 7 changed it up.  So not sure if there is still a workaround.  


Maybe, but the hack (replacing the app.xml) seems still to work. At least I just tried with the file the OP posted here.

Looks like I overlooked that posting of yours or forgot about it - both very likely 😞

Thanks for bringing it (again?) to my attention.

Hi,

 

Here is the Prime replacement for the excel sheet.  Prime sheet enclosed.

Capture.JPG 

Hi guys thanks for the solutions,

 

The equation is with the mathcad sheet at the top with all the variables. 

 

I initially used excel along time ago before starting on mathcad and have not got round to coming up with the best approach for this equation. To give me the best guess of change in tension which originated from the "change in state equation". there are 2 x unknown variables as shown below within the figures (PDF also attached)/ I also used the solver block in mathcad to see what answer I got but there must be a better way to use mathcad with for equations with 2 x unknown variables. 

 

Page 11 & 12 - Change in state equation (attached PDF and snippets below)

 

BG_9641770_0-1636369268797.pngBG_9641770_1-1636369288256.png

BG_9641770_2-1636369310190.png

BG_9641770_3-1636369326913.png

 

 

 

 

 

 

There are several fairly extensive posts on this forum, the latest https://community.ptc.com/t5/PTC-Mathcad/Catenary-formula-thru-ODE/m-p/667131#M190278 treats the catenary.  One of Valery's favorite repeating topics.  

 

As for equations with two unknowns, the function "lsolve" (with the equations in matrix form) will do.

Thanks Fred, the difference here is that the Catenary tension is not constant due to temperatures changes. The resultant moment being the difference in changes between the two spans hence the equation for differential spans. 

Hi,

The engineering solution is to simply use a solve block:  The sample problem with units.

Capture.JPG

It could be even simpler using the root function.

But if you want an exact solution:

LucMeekes_0-1636388062632.png

Note that there are three potential solutions, I guess the complex results don't apply.

Leaves the first. Its exactly:

LucMeekes_1-1636388197280.png

Success!
Luc

Top Tags