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 churichuro  
#1 Posted : 14 June 2020 20:46:33(UTC)
churichuro


Rank: Advanced Member

Groups: Registered
Joined: 27/03/2019(UTC)
Posts: 75
Mexico
Location: coah

Was thanked: 27 time(s) in 22 post(s)


hello again.

How can I get a graph from a variable? Example in graph 2 where nothing appears.

the content of the variable is pasted directly into graph 1 and
there it is working

I generate the matrices to draw a series of rectangles
but I don't know in advance how many rectangles will be drawn
that's why I require to use a variable that contains a system of several matrices

is there another solution?

stack-of-rec.sm (30kb) downloaded 12 time(s).

Edited by user 14 June 2020 20:57:35(UTC)  | Reason: Not specified

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

Offline mkraska  
#2 Posted : 15 June 2020 00:04:22(UTC)
mkraska


Rank: Advanced Member

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

Was thanked: 1124 time(s) in 721 post(s)
There might be other issues, but one of them could be the bug demonstrated here. Normally, no element assignment should alter the object type from list to matrix as it seems to happen in the line block definition. I think this is another regression, such stuff used to work in older versions (here 7251).

The original desparate workaround with str2num tries to handle the bug. Normally you should be able to reliably initialize a variable using any object of appropriate type.

Lists.png
Lists.sm (8kb) downloaded 8 time(s).
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline Jean Giraud  
#3 Posted : 15 June 2020 01:48:13(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: churichuro Go to Quoted Post
is there another solution?

Transit the 'gg' matrices via file, plot.

stack-of-rec.sm (32kb) downloaded 10 time(s).
Offline churichuro  
#4 Posted : 15 June 2020 02:56:33(UTC)
churichuro


Rank: Advanced Member

Groups: Registered
Joined: 27/03/2019(UTC)
Posts: 75
Mexico
Location: coah

Was thanked: 27 time(s) in 22 post(s)
thank you very much Martin Kraska and also to you Jean Giraud

both options work well
I attach the file with Martin's suggestion, which I
It seems what I was looking for, and I take note of the solution
Jean who as always is very helpful and educational
since you learn a lot from these examples.

Thank you!

stack-of-rec.sm (24kb) downloaded 14 time(s).
Offline Jean Giraud  
#5 Posted : 15 June 2020 03:04:19(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)
Much simpler Amigo ...
Isolate 'gg' gg:= gg ...or rectangles:= gg
Offline churichuro  
#6 Posted : 15 June 2020 03:44:58(UTC)
churichuro


Rank: Advanced Member

Groups: Registered
Joined: 27/03/2019(UTC)
Posts: 75
Mexico
Location: coah

Was thanked: 27 time(s) in 22 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
Much simpler Amigo ...
Isolate 'gg' gg:= gg ...or rectangles:= gg


Hahaha yes! this work too. Clap
Offline Jean Giraud  
#7 Posted : 15 June 2020 17:39:52(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)
If you want unicolor plot and rotation,
you may have to reconsider your construction.

Utilities XY [Draw Truss].sm (23kb) downloaded 19 time(s).
stack-of-rec.sm (38kb) downloaded 18 time(s).
thanks 1 user thanked Jean Giraud for this useful post.
on 12/05/2021(UTC)
Offline Jean Giraud  
#8 Posted : 15 June 2020 19:55:02(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)
Your H beam, you can have it SVG style.

Spline De Casteljau SVG Hbeam.sm (42kb) downloaded 19 time(s).
Offline mkraska  
#9 Posted : 15 June 2020 20:26:17(UTC)
mkraska


Rank: Advanced Member

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

Was thanked: 1124 time(s) in 721 post(s)
Originally Posted by: mkraska Go to Quoted Post
There might be other issues, but one of them could be the bug demonstrated here. Normally, no element assignment should alter the object type from list to matrix as it seems to happen in the line block definition. I think this is another regression, such stuff used to work in older versions (here 7251).

The original desparate workaround with str2num tries to handle the bug. Normally you should be able to reliably initialize a variable using any object of appropriate type.



The issue demonstrated in the above post nails down to unexpected handling of single element lists used to initialize the data under numeric optimization.

lists2.png

lists2.sm (7kb) downloaded 15 time(s).
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
thanks 2 users thanked mkraska for this useful post.
on 15/06/2020(UTC),  on 16/06/2020(UTC)
Users browsing this topic
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.