Quantcast
Viewing all articles
Browse latest Browse all 12262

Re: How to call values from a table and then do the minerr() calculation?

For questions about Mathcad its always a good idea to state which version you are using and its always helpful to attach a worksheet which shows what you have done so far.

Unless otherwise stated Mathcad 15 is assumed

1) As I read the minerr() instruction, var1, var2, .. should be either integer or complex number.

   Can var1, var2 be vectors?

Yes. The help calls it "array variables".

 

2) Is there any way to call var1, var2 from a separated table and then put them into minerr()?

Not sure what you mean. You can "call" a function, but not a variable. But the variables can be from any place any other MC variables can ste from - a matrix ("table"?) in the same sheet, from an extern Mathcad sheer or even read in from a CSV or an Excel file.

 

EDIT: I just had a glance at the thread you are coming from and it seems to me that you misunderstand what "Minerr" would do. You can provide guess values for the variables which should be varied, you may add some constraints but you cannot force Mathcad to consider only values for these variables from a given set of data. Maybe you should give the help a second look and also the quicksheet it referrs to.

What I understood from that post of yours is, that you have a set/vector of X-values and you want to chose any five of them to put them as parameters in function you have defined and a looking for that set of five values for which the function result is closest to a given value.

It looks to me that it needs a self written function to accomplish that.

But then I may be wrong as its not really fully clear to me what you are really after. Think you should post a worksheet and show by example what you are trying to accomplish.


Viewing all articles
Browse latest Browse all 12262

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>