1 Pages (5 items)
Problem with length() command - Messages
#1 Posted: 5/28/2012 4:34:39 AM
Hi, I have a problem using length() commang.
If used on matrix, it works well, but using the length() command on scalar value (which is, I think, matrix of size 1 by 1), it doesn't work well.

File with this problem: length_problem.sm.
If used on matrix, it works well, but using the length() command on scalar value (which is, I think, matrix of size 1 by 1), it doesn't work well.
File with this problem: length_problem.sm.
#2 Posted: 5/28/2012 5:01:40 AM
Hello,
You get the last math region [MATH=eng]lx_1=length(-1)[/MATH]. If yoo would use numerical equal to, there would be an error issued.
And, no - scalar is not a matrix of size 1 by 1.
Regards,
Rdaovan
You get the last math region [MATH=eng]lx_1=length(-1)[/MATH]. If yoo would use numerical equal to, there would be an error issued.
And, no - scalar is not a matrix of size 1 by 1.
Regards,
Rdaovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#3 Posted: 6/17/2012 7:31:07 AM
Hello,
thank you for your reply. Is trere any other way (instead of using "length()" command) how to find out the number of solutions of the equation?
Thank you for amazing SMath,
kind regards
Jan Skapa
thank you for your reply. Is trere any other way (instead of using "length()" command) how to find out the number of solutions of the equation?
Thank you for amazing SMath,
kind regards
Jan Skapa
Wrote
Hello,
You get the last math region [MATH=eng]lx_1=length(-1)[/MATH]. If yoo would use numerical equal to, there would be an error issued.
And, no - scalar is not a matrix of size 1 by 1.
Regards,
Rdaovan
#4 Posted: 6/17/2012 7:48:35 AM
Hello,
Could you be more specific, please?
Regards,
Radovan
WroteIs trere any other way (instead of using "length()" command) how to find out the number of solutions of the equation?
Could you be more specific, please?
Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#5 Posted: 6/17/2012 8:46:45 AM
Hi,
I don't see your file therefore I'm not sure, but I think that this snippet can help you:
varManager.zip
EDIT(1): now i can see your file
use it in this way:
[MATH]x_1:ToArray(x_1)[/MATH]
EDIT(2): instead of [MATH]x_1:ToArray(x_1)[/MATH] you can use [MATH]x_1:stack(x_1)[/MATH]
(x_1 can be an array, a scalar or a text)
then you can use:
[MATH]length(x_1)[/MATH]
regards,
w3b5urf3r
I don't see your file therefore I'm not sure, but I think that this snippet can help you:
varManager.zip
EDIT(1): now i can see your file

use it in this way:
[MATH]x_1:ToArray(x_1)[/MATH]
EDIT(2): instead of [MATH]x_1:ToArray(x_1)[/MATH] you can use [MATH]x_1:stack(x_1)[/MATH]

(x_1 can be an array, a scalar or a text)
then you can use:
[MATH]length(x_1)[/MATH]
regards,
w3b5urf3r
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 Pages (5 items)
-
New Posts
-
No New Posts