1 страниц (3 вхождений)
Problem with max and min - Сообщения
#1 Опубликовано: 08.04.2010 23:13:00
Hello
1) In some countings I have to find max or min value from, for example, 3 defined earlier definitions. After using max (min) function SMath is not showing results, but information that max (min) function has been not defined. What's even stranger - when I put my cursor over the definition of max (min) function it shows me inserted values.
Some screen shots (I'm using the Polish version, but on the second screen information is saying that function is not definied):



Is it bug or maybe I'm doing something wrong?
2) Is it possible to change default font?
SMath is the only alternative for the MathCAD - thank You a lot for creating and developing it. Keep up the good work
Best regards
Mateusz
1) In some countings I have to find max or min value from, for example, 3 defined earlier definitions. After using max (min) function SMath is not showing results, but information that max (min) function has been not defined. What's even stranger - when I put my cursor over the definition of max (min) function it shows me inserted values.
Some screen shots (I'm using the Polish version, but on the second screen information is saying that function is not definied):



Is it bug or maybe I'm doing something wrong?
2) Is it possible to change default font?
SMath is the only alternative for the MathCAD - thank You a lot for creating and developing it. Keep up the good work

Best regards
Mateusz
#2 Опубликовано: 08.04.2010 23:25:52
Hello, Mateusz.
Min and Max functions are defined only to work with one argument - matrix or vector. They can't accept any different count and types of arguments.

No, it is impossible for now.
Thank you for using SMath Studio.
Best regards, Andrey Ivashov.
WroteIs it bug or maybe I'm doing something wrong?
Min and Max functions are defined only to work with one argument - matrix or vector. They can't accept any different count and types of arguments.
WroteIs it possible to change default font?
No, it is impossible for now.
Thank you for using SMath Studio.
Best regards, Andrey Ivashov.
#3 Опубликовано: 09.04.2010 06:46:13
Hello, Mateusz
This restriction of "min" and "max" functions is not such a problem. Here is some possibility
[MATH]a1←2[/MATH]
[MATH]a2←5[/MATH]
[MATH]a3←3[/MATH]
[MATH]min(augment(a1;a2;a3))=2[/MATH]
or
[MATH]a←mat(a1;a2;a3;3;1)[/MATH]
[MATH]min(a)=2[/MATH]
Here is a bit more complex problem. Minimal element from two matrices?
[MATH]b←mat(3;-2;4;1;2;2)[/MATH]
[MATH]c←mat(3;4;1;-6;5;1;2;2;1;3;3)[/MATH]
[MATH]min(augment(min(b);min(c)))=-6[/MATH]
As the matrices have different numbers of rows and columns, you can not "augment" or "stack" them to make a single matrix. Let's try to make a single "blocked" matrix.
[MATH]d←mat(b;c;2;1)[/MATH]
[MATH]d=mat(mat(3;-2;4;1;2;2);mat(3;4;1;-6;5;1;2;2;1;3;3);2;1)[/MATH]
This will not work
[MATH]min(d)=#[/MATH]
Type conversion error! But there is a solution
[MATH]min(augment(min(el(d;1;1));min(el(d;2;1))))=-6[/MATH]
or
[MATH]min(stack(min(el(d;1;1));min(el(d;2;1))))=-6[/MATH]
I think it is not so complicated as it seems to be.
Regards,
Radovan
This restriction of "min" and "max" functions is not such a problem. Here is some possibility
[MATH]a1←2[/MATH]
[MATH]a2←5[/MATH]
[MATH]a3←3[/MATH]
[MATH]min(augment(a1;a2;a3))=2[/MATH]
or
[MATH]a←mat(a1;a2;a3;3;1)[/MATH]
[MATH]min(a)=2[/MATH]
Here is a bit more complex problem. Minimal element from two matrices?
[MATH]b←mat(3;-2;4;1;2;2)[/MATH]
[MATH]c←mat(3;4;1;-6;5;1;2;2;1;3;3)[/MATH]
[MATH]min(augment(min(b);min(c)))=-6[/MATH]
As the matrices have different numbers of rows and columns, you can not "augment" or "stack" them to make a single matrix. Let's try to make a single "blocked" matrix.
[MATH]d←mat(b;c;2;1)[/MATH]
[MATH]d=mat(mat(3;-2;4;1;2;2);mat(3;4;1;-6;5;1;2;2;1;3;3);2;1)[/MATH]
This will not work
[MATH]min(d)=#[/MATH]
Type conversion error! But there is a solution
[MATH]min(augment(min(el(d;1;1));min(el(d;2;1))))=-6[/MATH]
or
[MATH]min(stack(min(el(d;1;1));min(el(d;2;1))))=-6[/MATH]
I think it is not so complicated as it seems to be.
Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
1 страниц (3 вхождений)
-
Новые сообщения
-
Нет новых сообщений