[Scilab-users] Antwort: Re: Antwort: Antwort: Re: Antwort: Re: Problem with solving this elegantly

Pascal Buehler pascal.buehler at ch.sauter-bc.com
Tue Feb 27 14:42:19 CET 2018


OK, i will try.

with best regards / mit freundlichen Grüssen / cordialement

Pascal Bühler
Qualität-Hardware / Prüfingenieur
SAUTER HeadOffice
Fr. Sauter AG
Im Surinam 55, CH-4016 Basel
Telefon +41 (0)61 695 5646
Telefax +41 (0)61 695 5619
http://www.sauter-controls.com

DISCLAIMER:
This communication, and the information it contains is for the sole use of
the intended recipient. It is confidential, may be legally privileged and
protected by law. Unauthorized use, copying or disclosure of any part
thereof may be unlawful. If you have received this communication in error,
please destroy all copies and kindly notify the sender.

Before printing out this e-mail or its attachments, please consider 
whether 
it is really necessary to do so.
Using less paper helps the environment.



Von:    "Dang Ngoc Chan, Christophe" <Christophe.Dang at sidel.com>
An:     Users mailing list for Scilab <users at lists.scilab.org>, 
Datum:  27.02.2018 14:35
Betreff:        Re: [Scilab-users] Antwort: Antwort: Re: Antwort: Re: 
Problem with solving this elegantly
Gesendet von:   "users" <users-bounces at lists.scilab.org>



Hello Pascal,

> De : Pascal Buehler
> Envoyé : mardi 27 février 2018 14:00
>
> So this is my attempt for the Mohrscher Spannungskreis.
>
> Please impruve the code.

Well, first improvement would be to comment your code,
especially if you want other people to read it :-)

Apart from this, here are a few things:
You create a matrix called Tensor but you barely use it as a matrix;
sometimes you use elements of it, e.g. Tensor(1,1),
sometimes you use the values with their original name, e.g. Sigmaxx.
This has probably no influence considering the memory needed and 
calculation time
but some consistency would not hurt.

When you compute several times the same value, you should create a 
variable for it, e.g.

cdS = cosd(Schnittwinkel)

sdS = sind(Schnittwinkel)

TKomponenten= Schnittspannungsvektor*[cdS ; sdS]

TKoordinatenkomponenten=[cdS, sdS ; -sdS, cdS]*TKomponenten

Foo = 2*Tauxy/(Sigmaxx - Sigmayy)

aFoo = 0.5*atand(foo)

bFoo = 0.5*atand(-foo)

Richtungen1 = [0, 90, 180] + aFoo*[1, 1, 1]

Richtungen2 = [0, 90, 180] + bFoo*[1, 1, 1]

Hope this helps

--
Christophe Dang Ngoc Chan
Mechanical calculation engineer
This e-mail may contain confidential and/or privileged information. If you 
are not the intended recipient (or have received this e-mail in error), 
please notify the sender immediately and destroy this e-mail. Any 
unauthorized copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.
_______________________________________________
users mailing list
users at lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20180227/a572536d/attachment.htm>


More information about the users mailing list