1 Pages (10 items)
Remove zero rows and columns from a matrix - Messages
#1 Posted: 4/19/2021 10:44:50 PM
Hello
I am new to the use of Smath Studio, and I started by calculating the solution of a frame through the method of rigidities, the issue is that when carrying out the calculations I need to calculate a reduced matrix. For this I need to remove the rows and columns that contain zeros. I use the following function but it gives me an error, someone knows how to solve it

I am new to the use of Smath Studio, and I started by calculating the solution of a frame through the method of rigidities, the issue is that when carrying out the calculations I need to calculate a reduced matrix. For this I need to remove the rows and columns that contain zeros. I use the following function but it gives me an error, someone knows how to solve it


#2 Posted: 4/20/2021 2:59:54 AM
WroteHello
I am new to the use of Smath Studio, and I started by calculating the solution of a frame through the method of rigidities, the issue is that when carrying out the calculations I need to calculate a reduced matrix. For this I need to remove the rows and columns that contain zeros. I use the following function but it gives me an error, someone knows how to solve it
I don't know if there is a ready function but you can use the one I wrote myself.
You can either remove zero rows and columns manually or with a function.
With posted function you can not perform removal if matrix elements are text.
Regards
removezeros.sm (11 KiB) downloaded 31 time(s).
1 users liked this post
Andrey Ivashov 4/20/2021 5:39:00 AM
#3 Posted: 4/20/2021 4:47:25 AM
Overlord forgot to tell you that the two functions it used in its function, as well as the one you used to no avail (nonZeroRorwsCols (R)), is part of an external plugin (MatrixExtensions). Could it be that you haven't loaded the plugin? because it works correctly for me.
Until recently I myself did not know its existence since here in the forum (in English) I do not think it is reviewed. Maybe it is in the Russian-language forum.

sergio
Until recently I myself did not know its existence since here in the forum (in English) I do not think it is reviewed. Maybe it is in the Russian-language forum.
sergio
1 users liked this post
Andrey Ivashov 4/20/2021 5:39:00 AM
#4 Posted: 4/20/2021 8:30:53 AM
#5 Posted: 4/20/2021 8:42:13 AM
#6 Posted: 4/20/2021 9:09:51 AM
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#7 Posted: 4/20/2021 10:12:50 AM
attention Davide, in the first 'if' one of the two 'max' is a 'min'
sergio
OK has been corrected (do not consider this message)
sergio
sergio
OK has been corrected (do not consider this message)
sergio
1 users liked this post
Davide Carpi 4/20/2021 11:03:00 AM
#8 Posted: 4/20/2021 11:08:17 AM
Wroteattention Davide, in the first 'if' one of the two 'max' is a 'min'
sergio
TY, updated. Just shown the idea to have it working using the built-in features.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#9 Posted: 4/20/2021 1:01:58 PM
... alternately: brute force works well.
It has very many applications for purpose.
Take care all Collabs ... Jean
Page28 BruteForce.sm (13 KiB) downloaded 30 time(s).
It has very many applications for purpose.
Take care all Collabs ... Jean
Page28 BruteForce.sm (13 KiB) downloaded 30 time(s).
#10 Posted: 4/20/2021 5:02:18 PM
Hi. normi (infinitum norm) take the maximum of the absolute values of a matrix. max and min are defined only for reals, but a version with normi will work with complex numbers too. With the technique from Davide applied to the overlod method, it works also for empty answers.

rmEmptyRC.sm (8 KiB) downloaded 34 time(s).
Best regards.
Alvaro.
rmEmptyRC.sm (8 KiB) downloaded 34 time(s).
Best regards.
Alvaro.
1 users liked this post
sergio 4/21/2021 6:39:00 AM
1 Pages (10 items)
-
New Posts
-
No New Posts