Fonction Clear

Fonction Clear - Fonction Clear for matrices do not work - Messages

#1 Posted: 6/18/2013 7:24:50 PM
sebast3337

sebast3337

0 likes in 3 posts.

Group: User

Hello,

I have a question about Clear Fontion.

For scalar Number there's no problem with Clear Function.
But with Matrices and Vector Clear Function do not work.

Indeed, after used Clear Function with matrices ,
I can't redefined the matrice variable wich is cleared like a matrice.
I have to redefined the variable like a scalar end then like a matrice.

Sebast3337
Error Fct Clear.png
#2 Posted: 6/18/2013 9:13:56 PM
kilele

kilele

133 likes in 397 posts.

Group: User

- Clear does not work at all in my case ( running mono-build from windows, with the void file named "portable.version" )
- What's worst: I've noticed that if a plugin is disabled by the user, SMath ignores this action when recalculating the worksheet and the plugin still works. Besides the plugin is shown as enabled when the program is restarted. Please confirm this issue.
#3 Posted: 6/19/2013 12:34:19 AM
Davide Carpi

Davide Carpi

1415 likes in 2872 posts.

Group: Moderator

Wrote

Indeed, after used Clear Function with matrices ,
I can't redefined the matrice variable wich is cleared like a matrice.
I have to redefined the variable like a scalar end then like a matrice.

Sebast3337


I can't reproduce the issue (see the screenshot), could you attach an example (worksheet and screenshot)?

Wrote

Besides the plugin is shown as enabled when the program is restarted.


The "disable" action is related to the running session, even in the previous SMath relases. I think this behavior is by design.


best regards,

Davide
SMath Studio Desktop - [Page1].png
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#4 Posted: 6/19/2013 3:08:29 AM
kilele

kilele

133 likes in 397 posts.

Group: User

Apparently I was using the plugin functions incorrectly, so everything works fine including the disable function in the current session.
I was putting Clear() without an equal, so in the above example Clear(A) does not work, I should have written Clear(A)=
#5 Posted: 6/21/2013 10:40:52 PM
sebast3337

sebast3337

0 likes in 3 posts.

Group: User

Wrote

Wrote

Indeed, after used Clear Function with matrices ,
I can't redefined the matrice variable wich is cleared like a matrice.
I have to redefined the variable like a scalar end then like a matrice.

Sebast3337


I can't reproduce the issue (see the screenshot), could you attach an example (worksheet and screenshot)?

Wrote

Besides the plugin is shown as enabled when the program is restarted.


The "disable" action is related to the running session, even in the previous SMath relases. I think this behavior is by design.


best regards,

Davide




I have installed Net framework 4, and the problem with function Clear disappeared
ex.png
#6 Posted: 6/22/2013 2:33:38 AM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Could someone try this.

Regards,
Radovan

Clear.png
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
1 users liked this post
ioan92 6/22/2013 3:14:00 AM
#7 Posted: 6/22/2013 2:46:10 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Confirmed and explained in the attachment.

Clear() deletes the value of a variable but the type is set to line(). Element assignment to line()-variables outside the existing range generates unpredictable results.
If you want to do matrix element assignment with a cleared variable then you have to change the type first by assigning a (possibly empty) matrix.
Clear.sm (40 KiB) downloaded 73 time(s).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
4 users liked this post
ioan92 6/22/2013 3:14:00 AM, sergio 6/22/2013 3:27:00 AM, Davide Carpi 6/22/2013 3:48:00 AM, Radovan Omorjan 6/22/2013 5:34:00 AM
  • New Posts New Posts
  • No New Posts No New Posts