Subtracting matrices with a different number of columns

Subtracting matrices with a different number of columns - Arithmetic operation with a varying number of columns. - Poruke

#1 Objavljeno: 19. 11. 2025. 08:25:09
Thomas

Thomas

1 svidjanja u 4 postova.

Grupa: User

Hi,

Rc can have any number of columns and I want to subtract one column (xc, xy...) from that.

Is this only possible with a loop, or is there a more elegant way?


Bildschirmfoto vom 2025-11-19 09-24-20.png
Yoshi
#2 Objavljeno: 19. 11. 2025. 20:07:43
Martin Kraska

Martin Kraska

1.369 svidjanja u 2.283 postova.

Grupa: Moderator

It seems that you should write Rc: L-xc where xc is the vector of coordinates of the reference point. But you better attach an sm file and a more comprehensible description of what you want. I don't see a matrix with multiple columns in your example.
Izmenjeno 19. 11. 2025. 20:08:39
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
#3 Objavljeno: 20. 11. 2025. 07:43:34
Thomas

Thomas

1 svidjanja u 4 postova.

Grupa: User

Hi Martin, here is the worksheet.
Rc should be calculated automatically depending on the number of forces entered.

bolt_pattern.sm (42,76 KiB) preuzeto 1037 put(ova).
Izmenjeno 20. 11. 2025. 09:52:44
Yoshi
#4 Objavljeno: 21. 11. 2025. 10:11:24
StvMath

StvMath

44 svidjanja i 1 nesvidjanja u 76 postova.

Grupa: User

Like this?

Vectors.png
#5 Objavljeno: 21. 11. 2025. 12:02:20
Martin Kraska

Martin Kraska

1.369 svidjanja u 2.283 postova.

Grupa: Moderator

Slightly different solution

grafik.png
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
#6 Objavljeno: 21. 11. 2025. 13:22:56
Thomas

Thomas

1 svidjanja u 4 postova.

Grupa: User

Thank you very much for your help, it works perfectly now. Martin's solution is a little more compact, but both work.

bolt_pattern.sm (39,73 KiB) preuzeto 1033 put(ova).

Izmenjeno 21. 11. 2025. 13:51:59
Yoshi
#7 Objavljeno: 21. 11. 2025. 16:10:30
Alvaro

Alvaro

1.139 svidjanja u 1.805 postova.

Grupa: User

Hi. Third option: vectorize twice.

image.png

bolt_pattern.sm (52,91 KiB) preuzeto 1036 put(ova).

Best regards.
Alvaro.
  • Novi postovi
  • Nema novih postova