1 Pages (4 items)
Minimum/Maximum value - Messages
#1 Posted: 3/26/2011 4:11:35 PM
I thought SMath was missing a min and max function for scalars but soon realized an easy way around it.
I put a matrix containing the values I want to determine the min or max of

The example shown above illustrates what I do.
I type min( and within the parenthesis I type mat(. This gives me a three by three matrix. I place my cursor anywhere in the matrix and type comma. This expands the matrix to its function form. I then edit the last two values to have the number of rows (1) and columns (3) and then delete the extra cells. I've left one cell in just so you can see what it looks like. Then I fill in the cells.
Rather than type the comma to see the function command, you can also grab the lower right hand corner and shrink the 3x3 matrix to your desired size.

I put a matrix containing the values I want to determine the min or max of

The example shown above illustrates what I do.
I type min( and within the parenthesis I type mat(. This gives me a three by three matrix. I place my cursor anywhere in the matrix and type comma. This expands the matrix to its function form. I then edit the last two values to have the number of rows (1) and columns (3) and then delete the extra cells. I've left one cell in just so you can see what it looks like. Then I fill in the cells.
Rather than type the comma to see the function command, you can also grab the lower right hand corner and shrink the 3x3 matrix to your desired size.
Ed
1 users liked this post
Chaz 4/17/2025 5:11:06 PM
#3 Posted: 5/29/2012 4:42:00 AM
Hello Ed,
I think there is no way in SMath 0.94 to get the mat() in its functional form. Pressing comma in the matrix template will have no effect at all. Pressing comma will insert an empty placeholder in the single row or single column(vector) matrix ([BACKSPACE] will remove the row-matrix, vector element). There is no way at the moment to, say, insert an empty row or an empty column - excluding the srinking and streching the lower right corner wich will add ampty columns to the right and empty rows to the bottom.
Anyway, as the vectors are in this min() and max() problem involved, it would solve the mentioned problem. On the other hand, I think that min() amd max() should be improved in order to get different number of arguments (scalars, vectors, matrices) - if possible, of course.
Regards,
Radovan
WroteI type min( and within the parenthesis I type mat(. This gives me a three by three matrix. I place my cursor anywhere in the matrix and type comma. This expands the matrix to its function form. I then edit the last two values to have the number of rows (1) and columns (3) and then delete the extra cells. I've left one cell in just so you can see what it looks like. Then I fill in the cells.
I think there is no way in SMath 0.94 to get the mat() in its functional form. Pressing comma in the matrix template will have no effect at all. Pressing comma will insert an empty placeholder in the single row or single column(vector) matrix ([BACKSPACE] will remove the row-matrix, vector element). There is no way at the moment to, say, insert an empty row or an empty column - excluding the srinking and streching the lower right corner wich will add ampty columns to the right and empty rows to the bottom.
Anyway, as the vectors are in this min() and max() problem involved, it would solve the mentioned problem. On the other hand, I think that min() amd max() should be improved in order to get different number of arguments (scalars, vectors, matrices) - if possible, of course.
Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
1 users liked this post
Davide Carpi 5/29/2012 4:45:00 AM
#4 Posted: 5/29/2012 6:54:01 AM
WroteOn the other hand, I think that min() amd max() should be improved in order to get different number of arguments (scalars, vectors, matrices) - if possible, of course.
Also consider the mathcad use of min() and max() on functions (useful to plot graphs) as in this old post of mine

http://en.smath.info/forum/yaf_postst965_How-to-tell-which-color-corresponds-to-each-function.aspx
1 users liked this post
Davide Carpi 7/15/2012 3:33:00 PM
1 Pages (4 items)
-
New Posts
-
No New Posts