Subtracting matrices with a different number of columns

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

#1 Posted: 2025/11/19 08:25:09
Thomas

Thomas

1 likes in 4 posts.

Group: 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 Posted: 2025/11/19 20:07:43
Martin Kraska

Martin Kraska

1,308 likes in 2,221 posts.

Group: 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.
Edited 2025/11/19 20:08:39
Martin KraskaPre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#3 Posted: 2025/11/20 07:43:34
Thomas

Thomas

1 likes in 4 posts.

Group: 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) downloaded 204 time(s).
Edited 2025/11/20 09:52:44
Yoshi
#4 Posted: 2025/11/21 10:11:24
StvMath

StvMath

43 likes and 1 dislikes in 68 posts.

Group: User

Like this?

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

Martin Kraska

1,308 likes in 2,221 posts.

Group: Moderator

Slightly different solution

grafik.png
Martin KraskaPre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#6 Posted: 2025/11/21 13:22:56
Thomas

Thomas

1 likes in 4 posts.

Group: 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) downloaded 179 time(s).

Edited 2025/11/21 13:51:59
Yoshi
#7 Posted: 2025/11/21 16:10:30
Alvaro

Alvaro

1,078 likes in 1,749 posts.

Group: User

Hi. Third option: vectorize twice.

image.png

bolt_pattern.sm (52.91 KiB) downloaded 187 time(s).

Best regards.
Alvaro.
  • New Posts
  • No New Posts