combining arrays

combining arrays - Messaggi

#1 Pubblicato: 11/01/2022 11:21:07
1986max

1986max

0 apprezzamenti in 9 post.

Gruppo: 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) scaricato 1255 volta(e).
#2 Pubblicato: 11/01/2022 13:12:55
sergio

sergio

127 apprezzamenti in 342 post.

Gruppo: User

One way (stack use)

q-1-2_ser.sm (6,18 KiB) scaricato 1323 volta(e).
sergio
1 utenti hanno apprezzato questo post
Andrey Ivashov 11/01/2022 15:23:00
#3 Pubblicato: 11/01/2022 13:51:29
Jean Giraud

Jean Giraud

983 apprezzamenti in 6.866 post.

Gruppo: 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 Pubblicato: 12/01/2022 03:58:49
1986max

1986max

0 apprezzamenti in 9 post.

Gruppo: User

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

Jean Giraud

983 apprezzamenti in 6.866 post.

Gruppo: User

Wrote

Thank a lot, all options are excellent !


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

Utilities Matrix Extractors.sm (56,76 KiB) scaricato 1264 volta(e).
1 utenti hanno apprezzato questo post
sergio 12/01/2022 11:17:00
#6 Pubblicato: 14/01/2022 15:06:20
overlord

overlord

600 apprezzamenti in 1.381 post.

Gruppo: 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) scaricato 1205 volta(e).

2022-01-14_21-02.png
  • Nuovi post
  • Nessun nuovo post