Rank: Advanced Member Groups: Registered
Joined: 27/03/2019(UTC) Posts: 75 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
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,986 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.sm (8kb) downloaded 8 time(s). |
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: churichuro is there another solution? Transit the 'gg' matrices via file, plot. stack-of-rec.sm (32kb) downloaded 10 time(s).
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 27/03/2019(UTC) Posts: 75 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).
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Much simpler Amigo ... Isolate 'gg' gg:= gg ...or rectangles:= gg
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 27/03/2019(UTC) Posts: 75 Location: coah Was thanked: 27 time(s) in 22 post(s)
|
Originally Posted by: Jean Giraud Much simpler Amigo ... Isolate 'gg' gg:= gg ...or rectangles:= gg Hahaha yes! this work too.
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
|
1 user thanked Jean Giraud for this useful post.
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,986 Was thanked: 1124 time(s) in 721 post(s)
|
Originally Posted by: mkraska 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.sm (7kb) downloaded 15 time(s). |
|
2 users thanked mkraska for this useful post.
|
on 15/06/2020(UTC), on 16/06/2020(UTC)
|
|
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.