Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline TheWizEd  
#1 Posted : 26 March 2011 22:11:35(UTC)
TheWizEd


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2010(UTC)
Posts: 178
Man
United States

Was thanked: 19 time(s) in 13 post(s)
I thought SMath was missing a min and max function for scalars but soon realized an easy way around it.Biggrinancing:

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

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline EdZen  
#2 Posted : 29 May 2012 04:25:32(UTC)
EdZen

Rank: Newbie

Groups: Registered
Joined: 28/05/2012(UTC)
Posts: 2
United States
Location: Phoenix, AZ

Aha ! - thank you

Ed
Offline omorr  
#3 Posted : 29 May 2012 11:42:00(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Hello Ed,
Originally Posted by: TheWizEd Go to Quoted Post
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.

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!"
thanks 1 user thanked omorr for this useful post.
on 29/05/2012(UTC)
Offline kilele  
#4 Posted : 29 May 2012 13:54:01(UTC)
kilele


Rank: Advanced Member

Groups: Registered
Joined: 30/03/2011(UTC)
Posts: 393

Was thanked: 132 time(s) in 113 post(s)
Originally Posted by: omorr Go to Quoted Post
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.


Also consider the mathcad use of min() and max() on functions (useful to plot graphs) as in this old post of mine Good
http://en.smath.info/for...ds-to-each-function.aspx
thanks 1 user thanked kilele for this useful post.
on 15/07/2012(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.