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 metrvg  
#1 Posted : 07 September 2021 23:07:55(UTC)
metrvg

Rank: Newbie

Groups: Registered
Joined: 11/08/2021(UTC)
Posts: 4

Hello guys, please your help! I've trying for weeks to do the equivalent WHILE in Smath Studio... a big tool for me. But I really cant figure it out, after watching thousands of videos and web pages. This might be a dumb question, but I'm kinda desperate.

I keep getting Z is not defined.

See the following captures:

Mathcad

MATHCAD.JPG

Smath Studio

SMATH2.JPG

Thank you very much in advance.

Regards

Edited by user 07 September 2021 23:10:24(UTC)  | Reason: Bad Capture

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

Offline overlord  
#2 Posted : 07 September 2021 23:36:04(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,128
Turkey

Was thanked: 509 time(s) in 339 post(s)
Originally Posted by: metrvg Go to Quoted Post
Hello guys, please your help! I've trying for weeks to do the equivalent WHILE in Smath Studio... a big tool for me. But I really cant figure it out, after watching thousands of videos and web pages. This might be a dumb question, but I'm kinda desperate.

I keep getting Z is not defined.

Thank you very much in advance.

Regards

SMath vectors/matrices don't start with 0 index.
First matrix/vector element gets the index 1.
Redesigning your code should make it tick.
Either make your indexes +1 or change your range to start with 1.

Regards

2021-09-07_23-34.png
thanks 1 user thanked overlord for this useful post.
on 14/09/2021(UTC)
Offline Jean Giraud  
#3 Posted : 08 September 2021 17:33:22(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)
The mountains of Mathcad that I converted for Smath were done simply.
1. From the Mathcad default index 0, save the result.
2. set Mathcad ORIGIN 1
3. Run the program, doctor as indicated by the red message.
I still have a gorgeous Mathcad ORIGIN 0 that couldn't be
converted/doctored ORIGIN 1 ... Damned mystic to me !
Cheers ... Jean.
Offline Jean Giraud  
#4 Posted : 08 September 2021 22:35:53(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)
Does it make sense to sanity Smath vs Mathcad more generally ?

Page9 Sanity Mathcad.sm (9kb) downloaded 22 time(s).
Offline wty3000  
#5 Posted : 10 September 2021 08:12:09(UTC)
wty3000

Rank: Newbie

Groups: Registered
Joined: 30/08/2021(UTC)
Posts: 5
China

Originally Posted by: Jean Giraud Go to Quoted Post
Does it make sense to sanity Smath vs Mathcad more generally ?

Page9 Sanity Mathcad.sm (9kb) downloaded 22 time(s).


when I download the attachment, run it,
the error happens : "j is not defined"
Is it my PC's problem?
Offline Jean Giraud  
#6 Posted : 11 September 2021 01:12:50(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: wty3000 Go to Quoted Post
when I download the attachment, run it,
the error happens : "j is not defined"
Is it my PC's problem?

PC problem ? Maybe as no visitor reported problem.
If so, can't explain ... for.PNG
Offline overlord  
#7 Posted : 11 September 2021 16:44:48(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,128
Turkey

Was thanked: 509 time(s) in 339 post(s)
Originally Posted by: wty3000 Go to Quoted Post
when I download the attachment, run it,
the error happens : "j is not defined"
Is it my PC's problem?

Could you please uninstall SMath and delete your smath config directory.
Directory should be in "C:\Users\<username>\AppData\Roaming\SMath\".
Delete the SMath directory in Roaming completely, purge it.
And could you please download new version again and install it?
Offline Jean Giraud  
#8 Posted : 12 September 2021 17:35:40(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: wty3000 Go to Quoted Post
when I download the attachment, run it,
the error happens : "j is not defined"

You can probably doctor wrt your SS version.
Cheers ... Jean.

Sanity MCD.PNG
Offline metrvg  
#9 Posted : 14 September 2021 23:05:39(UTC)
metrvg

Rank: Newbie

Groups: Registered
Joined: 11/08/2021(UTC)
Posts: 4

Guys, thanks for your advices, i've been progressing with Smath... BUT, I reached a new issue... and I still don't get it...

i even did the calls step by step marked in red.

What can be wrong in the sintax??

Check this out:

Mathcad
MathCadSum.JPG

Smath
SmathSum.JPG

Thank you very much in advance!

Regards

Offline overlord  
#10 Posted : 14 September 2021 23:25:05(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,128
Turkey

Was thanked: 509 time(s) in 339 post(s)
Originally Posted by: metrvg Go to Quoted Post
What can be wrong in the syntax??

We can't really tell what is the matter without the file.
I guess you tried to see the result in same region with the algorithm.
Same region result evaluation won't work with multi-line calculations.
But it will give you the correct results in a separate evaluation.
The syntax seems to appear correct. There is no problem with syntax.
When I wrote everything as you did, it just works.
Here is your algorithm written from scratch.

Regards

syntax.sm (6kb) downloaded 12 time(s).

2021-09-14_23-20.png

Edited by user 15 September 2021 01:35:26(UTC)  | Reason: Not specified

thanks 1 user thanked overlord for this useful post.
on 15/09/2021(UTC)
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.