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 sebast3337  
#1 Posted : 19 June 2013 02:24:50(UTC)
sebast3337

Rank: Newbie

Groups: Registered
Joined: 25/05/2013(UTC)
Posts: 3
France, Metropolitan
Location: 37

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
sebast3337 attached the following image(s):
Error Fct Clear.png

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

Offline kilele  
#2 Posted : 19 June 2013 04:13:56(UTC)
kilele


Rank: Advanced Member

Groups: Registered
Joined: 30/03/2011(UTC)
Posts: 393

Was thanked: 132 time(s) in 113 post(s)
- 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.

Edited by user 19 June 2013 04:20:20(UTC)  | Reason: Not specified

Offline Davide Carpi  
#3 Posted : 19 June 2013 07:34:19(UTC)
Davide Carpi


Rank: Advanced Member

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

Was thanked: 1334 time(s) in 877 post(s)
Originally Posted by: sebast3337 Go to Quoted Post
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)?

Originally Posted by: kilele Go to Quoted Post
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

Edited by user 19 June 2013 07:42:15(UTC)  | Reason: Not specified

Davide Carpi attached the following image(s):
SMath Studio Desktop - [Page1].png
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline kilele  
#4 Posted : 19 June 2013 10:08:29(UTC)
kilele


Rank: Advanced Member

Groups: Registered
Joined: 30/03/2011(UTC)
Posts: 393

Was thanked: 132 time(s) in 113 post(s)
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)=

Edited by user 19 June 2013 10:12:28(UTC)  | Reason: Not specified

Offline sebast3337  
#5 Posted : 22 June 2013 05:40:52(UTC)
sebast3337

Rank: Newbie

Groups: Registered
Joined: 25/05/2013(UTC)
Posts: 3
France, Metropolitan
Location: 37

Originally Posted by: w3b5urf3r_reloaded Go to Quoted Post
Originally Posted by: sebast3337 Go to Quoted Post
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)?

Originally Posted by: kilele Go to Quoted Post
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

Edited by user 22 June 2013 05:42:26(UTC)  | Reason: Not specified

sebast3337 attached the following image(s):
ex.png
Offline omorr  
#6 Posted : 22 June 2013 09:33:38(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Could someone try this.

Regards,
Radovan
omorr attached the following image(s):
Clear.png
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
thanks 1 user thanked omorr for this useful post.
on 22/06/2013(UTC)
Offline mkraska  
#7 Posted : 22 June 2013 09:46:10(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,988
Germany

Was thanked: 1127 time(s) in 723 post(s)
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.

Edited by user 22 June 2013 09:52:18(UTC)  | Reason: Not specified

File Attachment(s):
Clear.sm (41kb) downloaded 51 time(s).
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
thanks 4 users thanked mkraska for this useful post.
on 22/06/2013(UTC),  on 22/06/2013(UTC),  on 22/06/2013(UTC),  on 22/06/2013(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.