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 cmohanc  
#1 Posted : 29 July 2012 09:15:22(UTC)
cmohanc

Rank: Newbie

Groups: Registered
Joined: 07/03/2012(UTC)
Posts: 5
Location: India

I have a data : 24.4±0.015
I want to find out the maximum without having to write a code.
How is it possible?

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

Offline Ber7  
#2 Posted : 29 July 2012 11:09:08(UTC)
Ber7


Rank: Advanced Member

Groups: Registered
Joined: 15/07/2010(UTC)
Posts: 437
Man
Israel
Location: Beer-Sheva

Was thanked: 520 time(s) in 288 post(s)
For example, the so-
http://smath.info/live/?file=3857

Edited by user 29 July 2012 11:15:40(UTC)  | Reason: Not specified

Offline jabadu  
#3 Posted : 29 July 2012 15:14:23(UTC)
jabadu


Rank: Advanced Member

Groups: Registered
Joined: 10/11/2010(UTC)
Posts: 37
Location: Germany

Was thanked: 1 time(s) in 1 post(s)
Hey, this would be a very elegant way for the analysis of tolerance chains.

But there would be a Problem:

How can you enter a value of e.g. 25 +0,1/-0,2 or 25 +0/-0,2 ??

Any ideas?

Offline Davide Carpi  
#4 Posted : 29 July 2012 18:16:07(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,654
Man
Italy
Location: Italy

Was thanked: 1340 time(s) in 879 post(s)
Hi,

Originally Posted by: jabadu Go to Quoted Post
How can you enter a value of e.g. 25 +0,1/-0,2 or 25 +0/-0,2 ??


It's not difficult, just use the multiple values item (type "sys(" or click on the curly bracket in the "functions" right panel) Good

Open in SMath Cloud


regards,

w3b5urf3r

Edited by user 29 July 2012 18:22:57(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
thanks 1 user thanked Davide Carpi for this useful post.
on 30/07/2012(UTC)
Offline jabadu  
#5 Posted : 30 July 2012 15:01:43(UTC)
jabadu


Rank: Advanced Member

Groups: Registered
Joined: 10/11/2010(UTC)
Posts: 37
Location: Germany

Was thanked: 1 time(s) in 1 post(s)
Thanks w3b5urf3r,

but then I have the same question as in the beginning of this thread: how do I get the min / max-value of this result?

example

(btw how did you enter the preview of the live file in your post?)
Offline Davide Carpi  
#6 Posted : 30 July 2012 15:34:43(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,654
Man
Italy
Location: Italy

Was thanked: 1340 time(s) in 879 post(s)
HI Good

Originally Posted by: jabadu Go to Quoted Post
Thanks w3b5urf3r,

but then I have the same question as in the beginning of this thread: how do I get the min / max-value of this result?

example

(btw how did you enter the preview of the live file in your post?)

For the max() and min() values use the snippet sys2mat() in the attachment Wink

To show the preview click on "Get link..." in the bottom-right corner of Live SMath and copy&paste in your post the 2nd link Good


best regards,

w3b5urf3r

Edited by user 30 July 2012 15:38:37(UTC)  | Reason: Not specified

File Attachment(s):
sys2mat.sm (5kb) downloaded 51 time(s).
sys2mat_example.sm (12kb) downloaded 49 time(s).
Davide Carpi attached the following image(s):
sys2mat.PNG
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
thanks 1 user thanked Davide Carpi for this useful post.
on 17/09/2012(UTC)
Offline jabadu  
#7 Posted : 30 July 2012 17:02:06(UTC)
jabadu


Rank: Advanced Member

Groups: Registered
Joined: 10/11/2010(UTC)
Posts: 37
Location: Germany

Was thanked: 1 time(s) in 1 post(s)
Great - but one problem:

I get an error message "mat()-function is not defined" on every term below the line tc:= sys2mat(tc)

I use Smath 0.95 build 4594 on linux (same also on version 0.94 on linux).

:'(
Offline omorr  
#8 Posted : 30 July 2012 18:37:16(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,

Here is a screenshot from Ubuntu 12.04
No errors reported.

Regards,
Radovan
omorr attached the following image(s):
sys2mat-ubuntu.png
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline jabadu  
#9 Posted : 31 July 2012 13:04:37(UTC)
jabadu


Rank: Advanced Member

Groups: Registered
Joined: 10/11/2010(UTC)
Posts: 37
Location: Germany

Was thanked: 1 time(s) in 1 post(s)
Hmmm - this looks like it's my computer (running on the older ubuntu 8.04 (server version)) that have this problem. Update is scheduled, let's see how it changes.

Another question: Does SMath have something like a median-Funktion (= find the value between two given numbers)? Because the usual production process tries to work in the middle of the tolerance field this value could also be interesting to know in a tolerance chain.

Btw, why isn't it possible to transcode a system into a matrix with a build-in function? Or enhance the min/max/lenght/... function to work also with a system and not only with a matrix/vector? Is this not a common problem?



Offline omorr  
#10 Posted : 31 July 2012 14:44:39(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,
Originally Posted by: jabadu Go to Quoted Post
Hmmm - this looks like it's my computer (running on the older ubuntu 8.04 (server version)) that have this problem. Update is scheduled, let's see how it changes.

Try this SMath DEB packages. During the installation, missing dependencies will be reported, if any.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Davide Carpi  
#11 Posted : 31 July 2012 15:02:45(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,654
Man
Italy
Location: Italy

Was thanked: 1340 time(s) in 879 post(s)
Hi Good

Originally Posted by: jabadu Go to Quoted Post
Another question: Does SMath have something like a median-Funktion (= find the value between two given numbers)? Because the usual production process tries to work in the middle of the tolerance field this value could also be interesting to know in a tolerance chain.


You can try with linterp() or building a function like med(A;CoolSadA+Cool/2

Originally Posted by: jabadu Go to Quoted Post
Btw, why isn't it possible to transcode a system into a matrix with a build-in function? Or enhance the min/max/lenght/... function to work also with a system and not only with a matrix/vector? Is this not a common problem?


I don't know, it's not yet implemented but SMath is in continuous development and something can escape... I'm sure that in a future version there will be some improvements, specially if you report your Feature Requests... f.e. an improvement of max() and min() is requested from several users (max and min), and the support of systems is something that should be included but it's not reported Good


regards,

w3b5urf3r




If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Basile  
#12 Posted : 31 July 2012 16:17:08(UTC)
Basile


Rank: Advanced Member

Groups: Registered
Joined: 13/10/2010(UTC)
Posts: 172
Location: USA

Was thanked: 8 time(s) in 7 post(s)
Hello,

Why I am getting different answers?
(http://www.yourfilelink.com/get.php?fid=816752&dv=1)


Tolerance

Thanks,
Basile

Edited by user 31 July 2012 16:19:33(UTC)  | Reason: Not specified

Offline Davide Carpi  
#13 Posted : 31 July 2012 16:44:27(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,654
Man
Italy
Location: Italy

Was thanked: 1340 time(s) in 879 post(s)
Originally Posted by: Basile Go to Quoted Post
Hello,

Why I am getting different answers?
(http://www.yourfilelink.com/get.php?fid=816752&dv=1)


Tolerance

Thanks,
Basile


yourfilelink.com report: "Incorrect linking code. Please try again."

can't you attach the file on your post?

w3b5urf3r
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Basile  
#14 Posted : 31 July 2012 17:50:24(UTC)
Basile


Rank: Advanced Member

Groups: Registered
Joined: 13/10/2010(UTC)
Posts: 172
Location: USA

Was thanked: 8 time(s) in 7 post(s)
Here should be...
Basile attached the following image(s):
SMath1.JPG
Offline Davide Carpi  
#15 Posted : 31 July 2012 19:14:00(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,654
Man
Italy
Location: Italy

Was thanked: 1340 time(s) in 879 post(s)
Originally Posted by: Basile Go to Quoted Post
Here should be...


Hi,

it's the optimization in the definition of R, R,eq and R,e (see optimization of coloured equations in the attachment)


regards,

w3b5urf3r

Edited by user 31 July 2012 19:19:54(UTC)  | Reason: Not specified

File Attachment(s):
sys.sm (14kb) downloaded 17 time(s).
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline omorr  
#16 Posted : 31 July 2012 19:19:38(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,

Pay attention how sys() is working. In this simple example, every element from both sys() are combined with each other:

sys(1,20,2,1)+sys(50,300,2,1)=sys(51,70,301,320,4,1)

Sometimes it behaves differently, it depends on optimization applied.

Optimization numeric:
sys(1,20,2,1)+sys(1,20,2,1)=sys(2,21,21,40,4,1)

Optimization symbolic:
sys(1,20,2,1)+sys(1,20,2,1)=2*sys(1,20,2,1)

Actually: 2*sys(1,20,2,1)=sys(2,40,2,1)

To be honest, because sys() in the calculations can sometimes be quite confusing, my advice is to avoid it in calculations. Actually, I did not figure out yet where the sys() environment is the most useful for using - excluding plots.

Regards,
Radovan

Edited by user 31 July 2012 19:28:40(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Basile  
#17 Posted : 31 July 2012 19:42:21(UTC)
Basile


Rank: Advanced Member

Groups: Registered
Joined: 13/10/2010(UTC)
Posts: 172
Location: USA

Was thanked: 8 time(s) in 7 post(s)
Thank you both for your replies.
But how somebody will know a priori to leave the default or change the optimization?

Thanks,
Basile
Offline jabadu  
#18 Posted : 01 August 2012 18:57:54(UTC)
jabadu


Rank: Advanced Member

Groups: Registered
Joined: 10/11/2010(UTC)
Posts: 37
Location: Germany

Was thanked: 1 time(s) in 1 post(s)
Hello w3b5urf3r,

I found the reason why your snippets don't work on my machine. Change the decimal symbol to comma and the arguments separator to semicolon and you get the same errors. With decimal symbol "period" and argument separator "comma" everything is fine.

Haven't tested if this is a bug or a feature...

Because Andrey is improving the min/max-function in near future these snippets won't be needed any more (probably/hopefully)

greetings
jabadu
Offline Davide Carpi  
#19 Posted : 02 August 2012 04:26:17(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,654
Man
Italy
Location: Italy

Was thanked: 1340 time(s) in 879 post(s)
Originally Posted by: jabadu Go to Quoted Post
Hello w3b5urf3r,

I found the reason why your snippets don't work on my machine. Change the decimal symbol to comma and the arguments separator to semicolon and you get the same errors. With decimal symbol "period" and argument separator "comma" everything is fine.

Haven't tested if this is a bug or a feature...

Because Andrey is improving the min/max-function in near future these snippets won't be needed any more (probably/hopefully)

greetings
jabadu

Thank you very much...


seem it's an issue (BUG?) of the built-in functions str2num(#) and num2str(#) that have different behavior changing interface settings (see the attachments)


(probably the wrong behavior is in num2str(#) but I'm not sure)


regards,

w3b5urf3r

Edited by user 02 August 2012 04:35:24(UTC)  | Reason: Not specified

File Attachment(s):
num2str_str2num_bug.sm (6kb) downloaded 13 time(s).
Davide Carpi attached the following image(s):
num2str_bug.PNG
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Andrey Ivashov  
#20 Posted : 02 August 2012 21:16:08(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)
Thank you! Bug of str2num function fixed.

Regards.
thanks 1 user thanked Andrey Ivashov for this useful post.
on 02/08/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.