I think I've got it all figured out. Everything is working (finally!) thanks to that work-around with the Morphologic Time Loop output workaround. Thanks for the help everyone!
Re: Unknown Error: mpl%_exception - What does this mean?
Error: These values cannot be compared
Hello everyone,
I have had to convert a MathCAD spreadsheet from one of the old formats to Prime 2.0 and I am having trouble with program functionality. The spreadsheet is essentially a group of sub-programs or routines that are called on in a larger program further down in the sheet (pg. 37). At this point the program will not run due to a "These values cannot be compared" error. I have converted similar worksheets with essentially the same sub-programs and sub routines and not had this problem. The error appears to be the Evolve sub-program (Pg. 33) but it does not provide the source ofthe error.
Any explanation as to what is wrong and how to fix it would be appreciated.
Re: Error: These values cannot be compared
Don't be fooled by the document name. It is only considered a "Working Model" in MathCAD 15.
Re: SolidWorks - MathCAD Integration
Hi John,
did the SolidWorks MatCad Integration works with Prime2 ?
Regards
Gerd Korhammer
Re: Error: These values cannot be compared
I'm having difficulty with this solve block problem
Any suggestions on how to approach this problem would be appreciated. Thanks.
Re: I'm having difficulty with this solve block problem
Re: I'm having difficulty with this solve block problem
Werner,
As always, thanks for your prompt and detailed help. The solution you provided makes it obvious what I overlooked ... I needed that! Also, thanks for the "otherwise" usage help, it made it much more straightforward. Oh yes, thanks for leaving the clue to the definition case that I overlooked and left out as well.
Jay
Re: I'm having difficulty with this solve block problem
You are welcome.
Looking at it again I still don't understand why the integral from 0 to infinity (we had that in another thread) does not work.
And in this example I don't understand why the first integral (from 0 to 0.1) works, because the integrand is not defined for the range from 0 to 10^-5). Mathcad - always good for a surprise ;-)
Re: Export data from mathcad to Creo notebook(earlier layout)
The "Mathcad inputs" you are talking about are outputs, viewed from Mathcad, right? ;-)
I don't use Creo but maybe I can help you in getting your data into an Excel file.
You don't state if you are using Prime or real Mathad (15 or below), but as of the unit problem you report, I guess you are using MC15 or similar. Prime would support different units in an array - a plus of Prime among a lot of minus.
As Excel does not support units you would have to get rid of the units anyway if you write your data to an Excel file. You can do this by simply dividing the variable by the unit you want the value to be in when you collect your "inputs" into a matrix.
If you have further problems it may be helpful if you post your worksheet, if possible, and state what values you want to be written to which cells in the Excel sheet with WRITEEXCEL.
Re: Export data from mathcad to Creo notebook(earlier layout)
What version of Creo and Mathcad you are trying to reach?
Vinit Kothari wrote:
... In notebook when i check analysis, all analysis are grayed out(inactive) , excel analysis/tool based/external/mathcad analysis/prime analysis.
All inactive...
Can you provide screenshot of this issue?
Re: Phase Shift Problem
Here's another approach that will find the shift with a very high degree of accuracy. Depending on the goal of the analysis, it may also provide parameters that would lead directly to the required solution, also with a high degree of accuracy, and possibly with no need to actually shift the data arrays.
Re: Phase Shift Problem
Here is an appraoch using genfit to find the sinusoidal fit. I guess using FFT could do the job, too.
Additional an avi showing the results for all 27 data sheets.
Re: Phase Shift Problem
Here is an appraoch using genfit to find the sinusoidal fit.
Personally, I never use genfit. I find minerr easier to set up for anything other than very simple fits, and much more versatile.
I guess using FFT could do the job, too.
Not with much accuracy, because the data does not have an integer number of periods, and the number of periods is small. However, I have found in the past that a least squares fit of a sinusoid can be very sensitive to the guesses (especially if the sinusoid is undersampled), in which case an FFT is a great way of getting starting guesses. Some years ago I posted a worksheet that uses this approach. See
Re: Export data from mathcad to Creo notebook(earlier layout)
Re: Export data from mathcad to Creo notebook(earlier layout)
Hi , thank you for your time.Please find the attached file for your reference.
The "Mathcad inputs" you are talking about are outputs, viewed from Mathcad, right? ;-)
Right. These input are used to verify my design.Specifically u may use from input section bar_w,bar_l,bar_b,bar_gap,tw_l,tw_w,tw_b as inputs to be transferred to excel. As you specified you dont use creo. But if anyone else tries it , I want these to be transferred to creo notebook.
You don't state if you are using Prime or real Mathad (15 or below), but as of the unit problem you report, I guess you are using MC15 or similar. Prime would support different units in an array - a plus of Prime among a lot of minus.
I use Prime 1.0 and creo 2.0.
As Excel does not support units you would have to get rid of the units anyway if you write your data to an Excel file. You can do this by simply dividing the variable by the unit you want the value to be in when you collect your "inputs" into a matrix.
Perfect. Dividing vector by unit solved my problem.
NOW, I want thses inputs to start at columnB and row 1 in excel.
I read your earlier message for the same using dummy with different variables and all..i didnt understand it much. Hope you can help me out sooner.
Thank you very much for your interest in solving my problem.
Re: Phase Shift Problem
I guess using FFT could do the job, too.
Not with much accuracy, because the data does not have an integer number of periods, and the number of periods is small.
Yes, think you are right.
Added: But as "A" is a very clear signal and knowing that "A" and "F" would always have the same frequency we could cut the vectors so we get data with integer multiples of the period.
Re: Export data from mathcad to Creo notebook(earlier layout)
I use Prime 1.0 and creo 2.0.
That way we have kind of a problem. I am using the (current) version Prime 2 and while P2 will be able to read your P1 file, it incomprehensibly won't be able to save in P1 format. So you would not be able to open any file I could attach. There is no way to convert P2 to P1 format.
I would suggest not to use Prime1 and switch to Prime2 or MC15, if possible.
Perfect. Dividing vector by unit solved my problem.
Glad to hear. So it it seems it was not MC which would have refused the construction of the vector with different units but rather the routine WRITEEXCEL which didn't know what to do with the units in the course of exporting to Excel. Or the ability to have different units in a matrix was implented first in P2, I don't know and it doesn't matter anyway.
NOW, I want thses inputs to start at columnB and row 1 in excel.
I read your earlier message for the same using dummy with different variables and all..i didnt understand it much. Hope you can help me out sooner.
Unfortunately the behaviour of WRITEEXCEL has changed in Prime and it will start always writing at cell A1.
So in the thread I think you are talking about
I provided a self written routine WriteExcel() which would begin to write at any cell of the first sheet of the excel file. Its rather clumsy and works by first reading the full Excel sheet (if it already exists) in a Mathcad matrix, puts the data to be written at the correct position in that matrix and writes back the matrix.I attach a pdf of that file (the function is a the end) as you probably can't read it with your version. The dummy variable you mentioned is just a way to trigger the function. A function in Mathcad is forces to evaluate either if you assign the output to a variable or if you explicitely evaluate it (e.g. y:=sin(0) or sin(0)=). I want the function to evaluate (because I want the data to be written) but I am not interested in any "result", so I assign it a dummy variable.
You could use this routine if you are willing to retype it in Prime1.
In your case, as you want the data to be written beginnning at B1, it would seem the best to just add a dummy column as first column in your matrix.
You can't do so if there is some data in column A of your Excel file which you want to keep. In that case you would first read in that column and it would be that data you prepend as first matrix column.
Hope this helps but in any case I hope that someone else could guide you to a direct "marriage" of Prime1 and Creo, if that would be possible at all.
Re: Phase Shift Problem
I guess the call to the shift routine before the A/F-plot at the end should read
[vector(Fs,As,ts)]:=shift(Fs,As,ts, - round(PointShift))
BTW, have slightly changed my sheet - especially the A/F plot at the end.
Data set 4 contains some heavily oscillationg data (esp. 4/1059 and 4/1061) where the A/F-plot won't be suitable for visual judgement of the fit and shift.
Re: Phase Shift Problem
This fixes the guesses, but now there's something broken in the shift calcuation, and I haven't figured out what yet.