combining arrays

combining arrays - Messages

#1 Posted: 2022/1/11 11:21:07
1986max

1986max

0 likes in 9 posts.

Group: User

Tell me please.

Question - 1

There are several arrays. a=[1;2...4], b=[7;8..10], c=[12;13...15]

How do I combine them so that it turns out as follows - d=[1,2,3,4,7,8,9,10,12,13,14,15]

Question - 2

There is an array a=[1;2...10], I need to exclude several values from it so that it turns out as follows a=[1,2,5,6,7,9,10]

q-1-2.sm (3.71 KiB) downloaded 692 time(s).
#2 Posted: 2022/1/11 13:12:55
sergio

sergio

116 likes in 332 posts.

Group: User

One way (stack use)

q-1-2_ser.sm (6.18 KiB) downloaded 741 time(s).
sergio
1 users liked this post
Andrey Ivashov 2022/1/11 15:23:00
#3 Posted: 2022/1/11 13:51:29
Jean Giraud

Jean Giraud

983 likes in 6,866 posts.

Group: User

Wrote

Question - 2


Make it algo style, add/remove cols.
This way you will have in-situ as desired.
Welcome to Smath Community ... Jean.

AlgoSelect.PNG
#4 Posted: 2022/1/12 03:58:49
1986max

1986max

0 likes in 9 posts.

Group: User

thank a lot, all options are excellent!)
#5 Posted: 2022/1/12 10:26:33
Jean Giraud

Jean Giraud

983 likes in 6,866 posts.

Group: User

Wrote

Thank a lot, all options are excellent !


Appreciated ... more in there ... Jean.

Utilities Matrix Extractors.sm (56.76 KiB) downloaded 672 time(s).
1 users liked this post
sergio 2022/1/12 11:17:00
#6 Posted: 2022/1/14 15:06:20
overlord

overlord

580 likes in 1,348 posts.

Group: Moderator

In addition to sergio's answer, you can use an custom exclude function.
It will remove substances of a L# list from master M# list.

Regards

exclude.sm (5.92 KiB) downloaded 641 time(s).

2022-01-14_21-02.png
  • New Posts
  • No New Posts