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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

This function requires at least 4 argument

ZZ_10687107
6-Contributor

This function requires at least 4 argument

I have a problem in Mathcad. As the picture shown, it always says "This function requires at least 4 arguments but it applied to 1". Can anyone help me? Thank you

 

1 ACCEPTED SOLUTION

Accepted Solutions


@ZZ_10687107 wrote:

Hello Werner, as you might have guessed I retyped something from Mathcad 15 (converter not working).

It looks like I forgot to include some equations, can you please check? Does the solution you mentioned before still work? (The equations I forgot are attached in the picture)

 

One more question, where can I learn about the differences between mathcad 15 and Prime so that I can be aware of problems like this in the future? I tried to learn from YouTube but I couldn't get much out of it. Thank you

 


I remember that you wrote in another thread that you actually have the converter installed, that it gave you a non-helpful error and that you now try to retype a 100 page od Mathcad file which you are not allowed to post here from anew - not a pleasant outlook.

I still suggest contacting PTC support as of the bug in the converter.

 

Why should the solution I posted not work now? Just give it a try. I did and the result was pretty much the same - the result vector would consist of all equal values - maybe because the Excel input consists only of one line? Haven't looked into detail how the data vectors are calculated.

.

Furthermore the region

Werner_E_0-1685649512712.png

has no effect (as does the "Given" which you can delete)!?

In the MC15 file, is this expression actually below the L.min_solver(...):=... line or is it above it (but below "Given") ??

If its between "Given" and "Minimize", then its an additional constraint for the minimizer and you have actually to use a solve block like

Werner_E_2-1685650207795.png

 

I did so in the attached sheet (Prime 9 format), but it did not change any results.

Werner_E_3-1685650330805.png

 

 

I can't check if you missed some equations as I don't know the original MC15 file.

 

According literature, especially dealing with the differences between Mathcad and Prime I guess I can't be of much help. There are a few books about Prime, but I don't know any of them and I guess they won't deal with MC15 vs. Prime.
When you installed Prime you also installed the "Migration Guide", a pdf file which is also accessible from within Prime (Ressources - References - Migration Guide). Maybe it can be of a little help.

View solution in original post

8 REPLIES 8
LucMeekes
23-Emerald III
(To:ZZ_10687107)

The error message is tied to this:

LucMeekes_0-1685534769741.png

 

The definition of Lmin_solver is:

LucMeekes_1-1685534800109.png

Which means that Lmin_solver has 3 parameters, but none of them are used in its definition. What is used in its definition is Leffsolver, That is not a simple parameter or array, but a function, defined as:

LucMeekes_2-1685534929797.png

So Leffsolver needs 4 parameters, you use it in minimize, but supply only one parameter: the L. That's not enough.

You need to supply 3 more parameters to the minimize function.

 

Success!

Luc

ZZ_10687107
6-Contributor
(To:LucMeekes)

Hello Luc, thanks for the explanation

 

I see that you wrote "Given" in front of the definition of L.min_solver. So I guess you are retyping something which was created in Mathcad (version 15 or below) where "Given" would initiate a solve block. This changed completely in Prime as you would have to insert a solve block via the menu - "Given" is obsolete.

But "minimize" does not require the usage of a solve block anyway and can be used stand-alone if no additional constraints should be applied.

 

The problem seems to be that on contrary to Mathcad, Prime does not allow for incomplete functions in "minimize".
So I guess that a suitable workaround is using an auxiliary function like shown below

Werner_E_0-1685536962721.png

 

BTW, the sole definition of Leff.solver seems to be the rearrangement of the arguments so that L is the first one. This was done to allow Mathcad to fill in the missing arguments automatically when minimizing just for L. As this does not work in Prime anyway, you could abandon Leff.solver and use Leff.function right away if you like.

ZZ_10687107
6-Contributor
(To:Werner_E)

Hello Werner, as you might have guessed I retyped something from Mathcad 15 (converter not working).

It looks like I forgot to include some equations, can you please check? Does the solution you mentioned before still work? (The equations I forgot are attached in the picture)

 

One more question, where can I learn about the differences between mathcad 15 and Prime so that I can be aware of problems like this in the future? I tried to learn from YouTube but I couldn't get much out of it. Thank you

 

LucMeekes
23-Emerald III
(To:ZZ_10687107)

Why is the converter not working?

Did you forget to install it? (You have to tick that option during installation, by default it's not included.)

If you want you can repeat the installation to get the converter installed.

 

Success!
Luc


@LucMeekes wrote:

Why is the converter not working?

Did you forget to install it? (You have to tick that option during installation, by default it's not included.)

If you want you can repeat the installation to get the converter installed.

 

Success!
Luc


From this thread

https://community.ptc.com/t5/Mathcad/Convert-Mathcad-15-to-Prime/m-p/875534/highlight/true#M206707

it looks like the OP has the converter installed but ran into a bug of the converter and it seems not to be password proteced areas or characters like # in the file name, which are known to make the converter fail.


@ZZ_10687107 wrote:

Hello Werner, as you might have guessed I retyped something from Mathcad 15 (converter not working).

It looks like I forgot to include some equations, can you please check? Does the solution you mentioned before still work? (The equations I forgot are attached in the picture)

 

One more question, where can I learn about the differences between mathcad 15 and Prime so that I can be aware of problems like this in the future? I tried to learn from YouTube but I couldn't get much out of it. Thank you

 


I remember that you wrote in another thread that you actually have the converter installed, that it gave you a non-helpful error and that you now try to retype a 100 page od Mathcad file which you are not allowed to post here from anew - not a pleasant outlook.

I still suggest contacting PTC support as of the bug in the converter.

 

Why should the solution I posted not work now? Just give it a try. I did and the result was pretty much the same - the result vector would consist of all equal values - maybe because the Excel input consists only of one line? Haven't looked into detail how the data vectors are calculated.

.

Furthermore the region

Werner_E_0-1685649512712.png

has no effect (as does the "Given" which you can delete)!?

In the MC15 file, is this expression actually below the L.min_solver(...):=... line or is it above it (but below "Given") ??

If its between "Given" and "Minimize", then its an additional constraint for the minimizer and you have actually to use a solve block like

Werner_E_2-1685650207795.png

 

I did so in the attached sheet (Prime 9 format), but it did not change any results.

Werner_E_3-1685650330805.png

 

 

I can't check if you missed some equations as I don't know the original MC15 file.

 

According literature, especially dealing with the differences between Mathcad and Prime I guess I can't be of much help. There are a few books about Prime, but I don't know any of them and I guess they won't deal with MC15 vs. Prime.
When you installed Prime you also installed the "Migration Guide", a pdf file which is also accessible from within Prime (Ressources - References - Migration Guide). Maybe it can be of a little help.

ZZ_10687107
6-Contributor
(To:Werner_E)

I've told my boss about contacting PTC, but there's still no decision. But I have tried your suggestion about converting the shortened file. Some functions are working, while waiting for a decision I tried to do the migration by myself.

 

Actually in the MC15 file, the expression is between Given and Minimize. Thanks for explaining, I finally understand.

 

I just found out that there is a Migration Guide!!! Hahahaha...... Thanks again for the explanation

Top Tags