Fonction Clear

Fonction Clear - Fonction Clear for matrices do not work - 消息

#1 已发布: 2013/6/18 19:24:50
sebast3337

sebast3337

0个赞,共3个帖子。

组: 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 已发布: 2013/6/18 21:13:56
kilele

kilele

134个赞,共397个帖子。

组: 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 已发布: 2013/6/19 00:34:19
Davide Carpi

Davide Carpi

1,443个赞,共2,936个帖子。

组: 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 已发布: 2013/6/19 03:08:29
kilele

kilele

134个赞,共397个帖子。

组: 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 已发布: 2013/6/21 22:40:52
sebast3337

sebast3337

0个赞,共3个帖子。

组: 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 已发布: 2013/6/22 02:33:38
Radovan Omorjan

Radovan Omorjan

325个赞和1个踩,共2,052个帖子。

组: Moderator

Could someone try this.

Regards,
Radovan

Clear.png
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
1位用户喜欢此帖子
ioan92 2013/6/22 03:14:00
#7 已发布: 2013/6/22 02:46:10
Martin Kraska

Martin Kraska

1,362个赞,共2,276个帖子。

组: 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.93 KiB)已下载 1458 次。
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
4位用户喜欢此帖子
ioan92 2013/6/22 03:14:00, sergio 2013/6/22 03:27:00, Davide Carpi 2013/6/22 03:48:00, Radovan Omorjan 2013/6/22 05:34:00
  • 有新帖
  • 无新帖