Quantcast
Channel: PTC Community : Discussion List - PTC Mathcad
Viewing all 2936 articles
Browse latest View live

Bug in Mathcad 15 when changing a vector element from text to scalar

$
0
0

I came across a strange effect while reading in some data from an Excel sheet and changing some elements which where formatted as text in Mathcad back to be numbers. Mathcad woul not recognize the resulting matrix/vector to be a matrix of scalars (while it is, or at least should be).

 

See below and attached a simplified example. Can anybody explain that strange effects?

 

BTW, the same sheet converted works fine in Prime2.

 

Addendum: If you make the second assignment work as described by pressing F9 and you move arround the first V^2 assignment, it works, too!!????

The German error message is something like: "The object reference is not set to an instance of an object". Obviously users are not expected to ever see this message.

(Remark: The absolute value has to be set from Determinant to absolute value)

 

vector_error.png


User function with variable number of arguments

$
0
0

There is a lot of built-in function with different number of arguments - Find, root, log, stack, min, max etc

I am searching one way to create a user function with different number of arguments.

For this problem for example.

I would like to convert molarity of solution into molality. I need for this a user function with name Molality with 2 arguments - temperature and molarity.

I would like to convert mass ratio of solution into molality. I need for this a user function with name Molality with one argument - molarity. See the picture:

NaCl.png

(Mathcad 15) subscripts in variable names

$
0
0

I'd like to write an equation containing variables with subscripts, but my intention is that the  subscripts simply identify the variable rather than refer to an array, in other words r(sub)s refers not to element s of array r but simply to a variable named r(sub)s. Is that possible?

 

Many thanks in advance

 

Joe

Mathcad Prime 2.0 Formatting Issue

$
0
0

I have to submit a mathcad sheet for a project.  Everytime I exit the program and reopen my work it moves the equations and solutions arround so I have arrays over two diffrent sheets.  How can I save it and keep my format in place other than saving as a pdf, the instructor requires the orignal file?

Also a section of it has some fairly lengthty equations, and I was wondering if there is a way to decrease the math font size or change the orientation for only certian sheets?

Experimental data best fit

$
0
0

Hi,

 

I have some data that have been obtained experimentally. I used the built-in function "genfit" for the selection of the approximating function. I took to be a form of this function like: f(x)=a*x^b. And in this case, I know that the function at the point x = 0 must be zero (f(x_0)=0). Are there any suggestions what other functions can describe the experimental data best way? Thanks.

 

Pic_1.png

This Array Index is Invalid for This Array - NonMissingMean

$
0
0

Hi,

 

I'm trying to write a worksheet for some experiments that I carried out. Within the data sets are a number of NaNs, so I've put some code in to find the NonMissingMean, as I have to find the mean of different column vectors. The code is fine for NonMissingMean(D), where D is my data file, but when I try NonMissingMean(D^<2>) i.e. the mean of all data in column 2 that is a number, it says "this array index is not valid for this array".

 

I'm hoping someone here knows why this is, and possible ways of fixing it.

 

Thank you very much for your help in advance.

Spiral Capacitance

$
0
0

I have a set of spiral electrodes that I modeled using MathCad to help me develope a way to calculate the total capacitance. I'd welcome the collabs help to determine a better, more accurate solution.

 

I tried two methods:

 

1) Using an example from my old calculus book, i determined the length of the spiral and simply calculated the capacitance of two plates.

 

2) Taking a section of the assembly and treating each turn of the spiral as a cylinder and used the capacitance calculation of two cylinders (as a start) form my old physics book.

 

 

Old books are great!

 

I look forward to alternative solutions to determine the total capacitance.

 

Sincerely,

 

Norm

Is there anyway to convert mathcad prime 2.0 to mathcad 15?

$
0
0

I unfortunately uncovered some of the pitfalls of the Mathcad Prime 2.0 and I am now trying to revert back to Mathcad 15.  Unfortunately, I discovered the problems with prime after I completed a lot of work.  I was thinking that the formatting issues surely were just because of my ignorance of Prime. Shame on me I guess.  Does anyone know of way to convert mathcad prime files back to mathcad 15 files? 


Bug in Prime 2 with unit placement

$
0
0

Is the following bug in Prime 2 already known and addressed in Prime 3?

Wrong_unit_placement.png

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

$
0
0

Hi:

 

This is the reply I got from created by VladimirN. in Creo.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

This is a built-in Mathcad function. Minerr(var1, var2, ...) - returns the values of var1, var2, ..., coming closest to satisfying a system of equations and constraints in a Solve Block. Returns a scalar if only one argument, otherwise returns a vector of answers. If Minerr cannot converge, it returns the results of the last iteration.

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

I have two questions:

 

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

   Can var1, var2 be vectors?

 

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

Weird error messages in a formerly calculating Mathcad sheet

$
0
0

I now get error messages (Mathcad 15 M10) in a complex Mathcad sheet with many symbolic numeric expressions that prieviously calculated with no problem.

One is:   A numeric term involving the sin function now shows error "this value must be a function but has the form R unitless"

The second occurrs in symbolic evaluations which no longer calculate with the message "pattern match exception"

If I cut and paste the expression to a blank worksheet it evaluates without error

Has any one else seen these error statements?  So far technical support has not been able to help other than to suggest updating Mathcad 15 to M20.

Dave Snelling

Find and replace subscripts

$
0
0

I have been using Mathcad Prime 2.0 and I'd like to find and replace some subscripts. Unfortunately, when I try to change

Var.x with Var.y (using the old Mathcad 15 notation), I end up with a strange problem. I can search for "x" and chose to replace with "y", but because it's a subscript, what I end up with is replacing "Var.x" with "y". This is a big problem when you have a large worksheet. Does anyone know when this bug will be fixed and what kind of workaround might be available?

Electronic board design: discrete variable value

$
0
0

Hello,

I'm setting up a Mathcad document for electronic circuit project.

I need a variable wich value are not continuos, but discrete: resistors for example are not avaible in alla value .. so I decalred a vector with the possible value of the resistors in the market:

 

10 12 15 18 22 27 33 39 47 56 68 82 100 120 150 180 220 270 330 390 470 560 680 820 1000 1200 1500 1800 2200 2700 3300 3900 4700 5600 6800 10000 12000 15000 18000 22000 27000 33000 39000 47000 56000 68000 100000 120000 150000 180000 220000 270000 330000 390000 470000 560000 680000

 

How can I declare a new variable with only this possible value?
I'd like to try a solution block to minimize and maximize a value of a voltage splitter (Vsplit = (V1/(R1+R2))*R2), but the resistor value must be one of the market value.

 

Thankyou

LeastSquaresFit Problem

$
0
0

Hello folks

 

when using LeastSquaresFit I'm getting an error notification: Unable to cast object of type 'Mcd.NumVal' to type 'Mpl.Run.Function'.

 

I'm using it for the first time so I'm not certain that the fault isn't mine. Any suggestions where to find the culprit?

 

Raiko

 

P.S.

I'm using MC 15 (M020) on a 64 bit Win 7 machine.

Rerunning a loop with a condition.

$
0
0

This is a small part of my loop which gives me the value of P.M in the end;  which is a

(312 X 10) matrix.

 

 

I am interested in calculating P.M with a condition saying (PM<x) it reruns the loop again

incresing the value of xi by 10 each time

 

 

Please ignore the error as i have deleated 95% of the table since it was 15 pages long.

If  someone could please write a discription or a short example for help.

thanks in advance.


Returning Data from Excel Table, Mathcad 15.0

$
0
0

I have a table in excel and based on three input variables I need to return 1 output variable. Is it possible to just click on a cell and have that value become a variable to be used in subsequent calculations? I have attached the excel table below. What I need to do is return a value of Cf based on the grade, the width "d", and the thickness "b". For example if grade=structural, d=12, and b =3, then Cf would be 1.0 and if Grade = Stud and d=10 and b=4, then Cf would be 1.2. I need to have mathcad return the value of Cf to be used in later calulations. Thanks for any help.

Erro ao Inicializar - MathCad Prime 2.0 Unhandled Erro

$
0
0

Tenho o MathCad Prime 2.0 instalado em meu PC. Ele estava funcionando perfeitamente, porém repentinamente quando fui utiliza-lo novamente ele da esse erro e não abre. Já tentei reinstalar, executar como administrador e nada funciona. Alguem poderia ajudar ? Estou no aguardo.

Sem título.png

Prime 2.0 Issues

$
0
0

Hello fellow MCers,

 

I tried prime 1.0 and found it to be deficient. Hence, I gave Prime 2.0 a try. Here is what I found so far:

 

  1. Diagrams: not enough options and/or possibilities to prepare a decent graph; e.g. no legend.
  2. I find the pale blue cursor in equations hard to discern from the background. Is there any possibility to change the cursor's colour?
  3. Maybe it is the German keyboard layout, however the scroll wheel is the only reliable means to get from one page to another. Page up and page down work most of the time but the direction keys or the space bar don't.
  4. In functions having a loop a vertical line remains in the print out. Not a problem but annoying if you're whishing to use this for documentation.
  5. Startup time of Prime is really slow! And I'm using it on a Win7, 64 bit, 20 GB RAM machine.
  6. I'm not having issues with Ctrl_ instead of Ctrl. and I'm sure I can get used to it but the amount of click-work required to write a simple line with text and a variable is perplexing. This is especially annoying when correcting equations. Also, see 2.

 

Anybody else having these issues?

 

Raiko

Embed Excel sheet in Prime (2)

$
0
0

When I embed an Excel sheet in Mathcad 15, I can distribute the worksheet and it will work even though the original Excel sheet is not available on the recipients machine.

 

Doing it with the Excel component in Prime2, the worksheet seems to work but only until the next worksheet recalculate (Ctrl-F9). Then an error is thrown as Mathcad would try to reread the Excelfile which is not existent. Thats cumbersome.

 

Am I missing something or is this as it's supposed to work. If the latter, it should be changed IMHO.

Problems with excel inputs

$
0
0

When I try to put the equation in the space of inputs execel componet it returns me the error as the image attached.

Could someone help me please.

Viewing all 2936 articles
Browse latest View live


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