Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline Alex M.  
#1 Posted : 10 May 2016 04:25:24(UTC)
Alex M.


Rank: Advanced Member

Groups: Registered
Joined: 03/03/2014(UTC)
Posts: 418
Canada

Was thanked: 125 time(s) in 96 post(s)
Hello All,

I am having trouble converting the following "sampleXMCD.xmcd" file to SMath Studio. I foresee that in the future I will HAVE TO convert some of the v15 .xmcd files to SMath and I would love for the conversion to be done automatically.

Any ideas? This will greatly help me at work.

Thanks!

sampleXMCD.xmcd (42kb) downloaded 45 time(s).

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Davide Carpi  
#2 Posted : 10 May 2016 11:54:11(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,647
Man
Italy
Location: Italy

Was thanked: 1329 time(s) in 875 post(s)
In the method
Code:
public static Term[] PrefixToPostfix(Term[] value)

I found that an exeption is thrown while parsing the UnitOperator; skipping this (that is just a workaround, there's an inconsistence to fix somewhere), it loads more functions but there are some errors in the last 2 xmcd regions (unrecognized tags ml:program and ml:return)

2016-05-10 10_52_12-SMath Studio Desktop 0.98.5973.12576.png
2016-05-10 10_52_35-SMath Studio Desktop - [sampleXMCD.xmcd].png

The patch on the UnitOperator seems that helps even here: http://en.smath.info/forum/yaf_postsm33083_Mathcad-file-import.aspx#post33083 (still missing the conversion for the "plot" region)

Reported as SS-2341

Edited by user 10 May 2016 12:59:30(UTC)  | Reason: correction

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Alex M.  
#3 Posted : 10 May 2016 18:05:36(UTC)
Alex M.


Rank: Advanced Member

Groups: Registered
Joined: 03/03/2014(UTC)
Posts: 418
Canada

Was thanked: 125 time(s) in 96 post(s)
Thank you for looking into this, Davide. I was not sure what plugin (or SS core?) it is related to so I have created a new thread.

Side note - if we want more active members in this community (and we do), it would help to make a transition from MathCAD 15 to SMath easier. Hence fixing this and similar errors is mildly important.

Edited by user 10 May 2016 18:19:01(UTC)  | Reason: Not specified

Offline Davide Carpi  
#4 Posted : 10 May 2016 18:24:51(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,647
Man
Italy
Location: Italy

Was thanked: 1329 time(s) in 875 post(s)
Originally Posted by: Alex.M Go to Quoted Post
Thank you for looking into this, Davide. I was not sure what plugin (or SS core?) it is related to so I have created a new thread.

You're welcome Good

The plugin is in the SVN (XMCDFileType)

Originally Posted by: Alex.M Go to Quoted Post
Side note - if we want more active members in this community (and we do), it would help to make a transition from MathCAD 15 to SMath easier. Hence fixing this and similar errors should be not at the very bottom of priority list.

I agree. The plugin is in the availability of all developers, so we can play a little with it. Since is shared with the official package, it is better to commit only strong and clean solutions (no dirty fixes; in this case we can submit these patches in the BTS to help Andrey with the debug).

I don't have mathcad, so I have no idea about how it works what is represented in the missing tags and if there is a SS equivalent.

Edited by user 10 May 2016 18:28:47(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Jean Giraud  
#5 Posted : 10 May 2016 21:06:46(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: Davide Carpi Go to Quoted Post
I don't have Mathcad, so I have no idea about how it works what is represented in the missing tags and if there is a SS equivalent.


What is "SS" ? In Matlab, SS = State Space.

As far as I'm familiar about Smath and a lot bit more confortable with 15 years Mathcad,
spending time to convert Mathcad 15 to Smath is like shoveling the clouds. What's
interptretable from Mathcad are some stuff from libraries ... per say: polyroots Mathcad is
polyroots for all. What made Mathcad so powerful is the advanced Mathsoft coding from various sources, mostly "Numerical Recipes". Recently, collab Elsid made me aware that Mathcad 15 could read very little from Mathcad 11 ... so Mathcad 15 is not able to access many of the most Mathcad web repositories [Mathcad 7, 8, 2000, 11].

What can be done between Mathcad 15 and Smath is what I'm doing with Mathcad 11: reconstruct. "I wish, want, would like, batch convert ... Mathcad 15".
I will repost the image rotate angle Mathcad 11 ... peanut for the Mathcad 15 to code,
then convert in Smath. Most of it is already converted but hangs at Mathcad "on error".

Cheers, Jean

Offline Davide Carpi  
#6 Posted : 11 May 2016 01:17:22(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,647
Man
Italy
Location: Italy

Was thanked: 1329 time(s) in 875 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
What is "SS" ? In Matlab, SS = State Space.

Eheheh, true, sorry for the unexplained acronym...

SS: Smath Studio

you may found others here and there Good

SV: SMath Viewer
NB: Nightly Build
EM: Extensions Manager
RM: Relase Manager
BTS: Bug Tracker System (link)
SVN: the SVN repository (link)


Originally Posted by: Jean Giraud Go to Quoted Post
spending time to convert Mathcad 15 to Smath is like shoveling the clouds.

The purpose would be to save time in conversion without reinventing the wheel (something is better than nothing, even if I have to admit, to reinvent something sometimes a blank sheet is better than working on the old code, and is a good way to learn how it works SMath)...

Numerical recipes is a very good source of knowledge Good (but I don't know how much the code can be reused for non-personal use without dealing with copyright stuff)

Edited by user 11 May 2016 01:45:18(UTC)  | Reason: link fixed

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Alex M.  
#7 Posted : 11 May 2016 17:21:52(UTC)
Alex M.


Rank: Advanced Member

Groups: Registered
Joined: 03/03/2014(UTC)
Posts: 418
Canada

Was thanked: 125 time(s) in 96 post(s)
Originally Posted by: Davide Carpi Go to Quoted Post
Originally Posted by: Alex.M Go to Quoted Post
Thank you for looking into this, Davide. I was not sure what plugin (or SS core?) it is related to so I have created a new thread.

You're welcome Good

The plugin is in the SVN (XMCDFileType)

Originally Posted by: Alex.M Go to Quoted Post
Side note - if we want more active members in this community (and we do), it would help to make a transition from MathCAD 15 to SMath easier. Hence fixing this and similar errors should be not at the very bottom of priority list.

I agree. The plugin is in the availability of all developers, so we can play a little with it. Since is shared with the official package, it is better to commit only strong and clean solutions (no dirty fixes; in this case we can submit these patches in the BTS to help Andrey with the debug).

I don't have mathcad, so I have no idea about how it works what is represented in the missing tags and if there is a SS equivalent.


Looking into this plugin would be next on my todo list. I will get to it faster if you could help me out with a frustrating clipboard access problem:

Quote:

I need to get clipboard content (image) in my EXCEL plugin (screenshot of range), and I am encountering "current thread must be set to sta before ole calls can be made". I understand it has something to do with <STAThread()> _

Could you suggest me a direction for the fix? Some direction is provided here, but it does not seem to quite work for me
http://stackoverflow.com...-single-thread-apartment

The code I am using is

Public Shared Sub SaveClipboardImageToFile(filePath As String)
Dim image As BitmapSource = Clipboard.GetImage()
Using fileStream = New FileStream(filePath, FileMode.Create)
Dim encoder As BitmapEncoder = New PngBitmapEncoder()
encoder.Frames.Add(BitmapFrame.Create(image))
encoder.Save(fileStream)
End Using
End Sub


I did some poking around and tried workaround like getting idataobject from clipboard (returns null), or clipboard.getimage (object reference not set to an instance... which means that data in clipboard is null).

All those errors are related to current thread not being STA (realized it from browsing online). The solution is to apply an STA flag to the MAIN() function, which I have no clue what it is. How can I do it from my low-level evaluation plugin?

http://computer-programm...arp/48d5e12bcaad228a.htm

Edited by user 11 May 2016 18:11:10(UTC)  | Reason: Not specified

Offline Jean Giraud  
#8 Posted : 11 May 2016 17:42:52(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: Davide Carpi Go to Quoted Post
Numerical recipes is a very good source of knowledge (but I don't know how much the code can be reused for non-personal use without dealing with copyright stuff)


Good point, Davide.

Mathcad/Mathsoft and "Numerical Recipes" origin in the same period [mid 1980].
Many of the Mathcad powerful solvers are practical and most advanced in compacted
form ... Given/Minerr [QuasiNewton, ConjugateGradient, Levenberg-Marquardt,
user], Genfit had very little use but is the core algorithm in the GenfitMatrix
developped by Robert for the Padé rational fraction [a piece of gold].
Given/Find [Maximise/Minimise] c/w symbolic expansion.
The 'root' is also very powerful [Brent, Ridder].

Mathcad gurus of my time who could crack the code are gone [Paul, Tom, Xavier...]
About the 'copyright ®', the issue seems simple. Purchase the book, which is in
the public domain, apply as you wish... crack the Mathcad code in China where there
is no 'copyright'.

The attached image is Mathcad 11. Should be same in Mathcad 15, easy for 15 users.
Once in Mathcad 15 by some Smath users, then attempt to "convert" Smath.
In Mathcad 11: independent of ORIGIN 0 or 1. The plot is matrix in any color, in Smath
it will be grayscale unless Alex can make it RGB.

Something simple to crunch for you collabs asking for Mathcad 15 => Smath conversion.
Hope to read feedback ... Jean

Pattern Mandelbrot.bmp



Offline soletto  
#9 Posted : 27 June 2016 22:47:27(UTC)
soletto


Rank: Advanced Member

Groups: Registered
Joined: 26/06/2016(UTC)
Posts: 45
Man
Austria
Location: Styria

Anyone has an answer?

Thx

edit: Screenshot of the error message


please don't delete any post if it contains bug infos

Edited by moderator 05 July 2016 21:47:04(UTC)  | Reason: Not specified

Offline Davide Carpi  
#10 Posted : 28 June 2016 01:42:13(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,647
Man
Italy
Location: Italy

Was thanked: 1329 time(s) in 875 post(s)
These are other missing attributes from the xmcd schema. Moved your question here since it is the same issue (about other elements).

Edited by user 28 June 2016 01:46:21(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Jean Giraud  
#11 Posted : 28 June 2016 07:21:49(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: soletto Go to Quoted Post
Anyone has an answer?

===================================
My dear friend: you have opened the old can of worms which has several answers.
There is an immense amount of similarities between the Smath/Mathcad coding.
That means you can recode lot of Mathcad stuff in Smath. But converting directly
a Mathcad work work sheet in Smath: answer is NO . If Andrey would do that He
would be sued next day for "Reverse Engineering" a Copyrighted product.

You had a key word from your initial thread "iterative".
"Iterative" means solving. In Smath, we have two great iterative solvers:
1. The "root solve" ... 12 to 15 decimals.
2. The "integrator" ... 12 to 15 decimals.

I can't explain to myself what is Xmcd 15 is doing in Smath. At least you are sure
it does nothing at the Smath user level. I have a nuance on that, like this:
Russians are "smart cats", I guess they can invent any kind of "crack"...

Jean

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.