Mathcad While / Smath For

Mathcad While / Smath For - Help with the structure - Poruke

#1 Objavljeno: 7. 9. 2021. 17:07:55
metrvg

metrvg

0 svidjanja u 5 postova.

Grupa: User

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
#2 Objavljeno: 7. 9. 2021. 17:36:04
overlord

overlord

601 svidjanja u 1.382 postova.

Grupa: Moderator

Wrote

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
1 korisnika je svidelo ovu objavu
metrvg 14. 9. 2021. 17:06:00
#3 Objavljeno: 8. 9. 2021. 11:33:22
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

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.
#4 Objavljeno: 8. 9. 2021. 16:35:53
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

Does it make sense to sanity Smath vs Mathcad more generally ?

Page9 Sanity Mathcad.sm (8,19 KiB) preuzeto 1475 put(ova).
#5 Objavljeno: 10. 9. 2021. 02:12:09
wty3000

wty3000

0 svidjanja u 5 postova.

Grupa: User

Wrote

Does it make sense to sanity Smath vs Mathcad more generally ?

Page9 Sanity Mathcad.sm (8,19 KiB) preuzeto 1475 put(ova).



when I download the attachment, run it,
the error happens : "j is not defined"
Is it my PC's problem?
#6 Objavljeno: 10. 9. 2021. 19:12:50
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

Wrote

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
#7 Objavljeno: 11. 9. 2021. 10:44:48
overlord

overlord

601 svidjanja u 1.382 postova.

Grupa: Moderator

Wrote

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\\AppData\Roaming\SMath\".
Delete the SMath directory in Roaming completely, purge it.
And could you please download new version again and install it?
#8 Objavljeno: 12. 9. 2021. 11:35:40
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

Wrote

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
#9 Objavljeno: 14. 9. 2021. 17:05:39
metrvg

metrvg

0 svidjanja u 5 postova.

Grupa: User

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

#10 Objavljeno: 14. 9. 2021. 17:25:05
overlord

overlord

601 svidjanja u 1.382 postova.

Grupa: Moderator

Wrote

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 (5,16 KiB) preuzeto 1308 put(ova).

2021-09-14_23-20.png
1 korisnika je svidelo ovu objavu
metrvg 14. 9. 2021. 19:37:00
  • Novi postovi
  • Nema novih postova