IF with 2 conditions in 4 loops

IF with 2 conditions in 4 loops - IF with 2 conditions in 4 loops - Messages

#21 Posted: 6/14/2023 7:18:47 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Wrote

Wrote

If I'm confused and the angle of the vector with components (4,2) is not 26.5651°, could you explain to me what is the correct value, please?


The correct value is Smath code for Smath projects.
Take care Alvaro ... Jean.



Great!. I hope that this also includes no useless code or mismanagement of units, accurate capturing scientific concepts and the correct handling and debugging of errors in the code, using the latest available version of SMath to thus collaborate with its development and improvement without representing a burden that constantly reintroduces the same errors by using absolutely outdated versions with more than 5 years of obsolescence and practices already discredited long time ago.

Best regards.
Alvaro.
#22 Posted: 6/14/2023 7:39:04 PM
CBG

CBG

77 likes in 312 posts.

Group: User

Hola

I think there is a very strong confusion, since the original user of the doubt,
published in his third answer the following:

Wrote

Since i don't understand how i can ad my SMath Solver I try to explain it more.

I have a Task. The first stepps are allready done.

My last step is:

Lets say i have
X:10
and Y:6.

I got a Formular to solve a angle:

a°=atan(x/y)

BUT if x or y is Negative my formular is:

a°=atan(x/y)+180°

and if x and y is negative my formular is:

a°=atan(x/y)+360°


In conclusion my problem is i don't understand how to say

as soon as 1 of these conditions are suffused --> solve the formular for a° and end the loop.

Like

IF X & Y is positive solve:
a°=atan(x/y)

IF X is positive and Y is negative solve:
a°=atan(x/y)+180°

IF X is negative and Y is positive solve:
a°=atan(x/y)+180°

IF X & Y is negative solve:
a°=atan(x/y)+360°



I hope you underdstand me and can help me.

Sorry for my bad english

thanks in advance

I tried your advice with 2 IF in once but i don't undersand how to "end/close" the loop.



As indicated in the published, it is requesting the calculation of "aº = atan(x/y)",
which corresponds to the calculation of the angle next to the Opposite Leg

Dibujo_angulo_tangente_R2.png

Best Regards

Carlos

#23 Posted: 6/15/2023 9:21:49 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Owner of post asked for y/x, not x/y.



IF X & Y is positive solve:
a°=atan(x/y)

IF X is positive and Y is negative solve:
a°=atan(x/y)+180°

IF X is negative and Y is positive solve:
a°=atan(x/y)+180°

IF X & Y is negative solve:
a°=atan(x/y)+360°
#24 Posted: 6/15/2023 10:02:58 AM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Wrote

Wrote

Owner of post asked for y/x, not x/y.



IF X & Y is positive solve:
a°=atan(x/y)

IF X is positive and Y is negative solve:
a°=atan(x/y)+180°

IF X is negative and Y is positive solve:
a°=atan(x/y)+180°

IF X & Y is negative solve:
a°=atan(x/y)+360°



That's form the post #3.

From the first post:

Clipboard02.png

From the big picture in the post #6:

Clipboard01.png

And form the physical context, where is trying to decompose a plane Force into its horizontal and vertical components, it's obvious that those are the correct formulas, and not the ones "handwrites" in the post #3. For this is because one choose a wysiwyg live math editor like SMath and not a death plane text like octave for make engineering calculations.

Best regards.
Alvaro.

Clipboard00.png
#25 Posted: 6/15/2023 11:11:03 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

As indicated in the published, it is requesting the calculation of "aº = atan(x/y)",
which corresponds t▪o the calculation of the angle next to the Opposite Leg


That ends this atan(▪,▪) pugila

#26 Posted: 6/15/2023 11:39:20 AM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Wrote

Wrote

As indicated in the published, it is requesting the calculation of "aº = atan(x/y)",
which corresponds to the calculation of the angle next to the Opposite Leg


That ends this atan(▪,▪) pugila



Sostenella y no enmendalla!

Perfect. As my last post in this topic, I can conclude that this angle is atan(4,2) = 63.4349° in your world, but it is atan(2,4) = 26.5651° in mine; that the formulas that are written in SMath are irrelevant, as are any evidence that that angle is not the one you say. Where was that "The correct value is Smath code for Smath projects."? Forget it, I really don't care. I just wanted to prevent you from being able to fool others, but I admit that you are very good at it. You win.

Clipboard01.png

Best regards.
Alvaro.
#27 Posted: 6/15/2023 5:17:56 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

As my last post in this topic, I can conclude that this angle is atan(4,2) = 63.4349° in your world, but it is atan(2,4) = 26.5651° in mine;


Your conclusion is correct.
The demand was atan(x/y)
Your interpretation is atan(y/x) ... End of it.
While walking in the forest,
if you come across twice the same tree, you are lost !

atan(x,y) More.PNG
#28 Posted: 6/15/2023 5:52:37 PM
overlord

overlord

549 likes in 1332 posts.

Group: Moderator

I think, no I know Razonar is right.
When someone is debating with Jean, result is always same.
Jean is wrong, won't admit he is wrong, then blabber some shit.
He has given sample from Carlos. Look what he posted, elementary school information for atan() calculation.
Click to expand
What is the angle calculation for a°, well it is obvious. atan(y/x) or atan(y,x).

Jean never disappoints me while he was humiliating himself. Over and over again, I forgot the count of it.
1 users liked this post
Alvaro Diaz Falconi 6/15/2023 5:57:00 PM
#29 Posted: 6/15/2023 6:22:37 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Wrote

Wrote

As my last post in this topic, I can conclude that this angle is atan(4,2) = 63.4349° in your world, but it is atan(2,4) = 26.5651° in mine;


Your conclusion is correct.
The demand was atan(x/y)
Your interpretation is atan(y/x) ... End of it.
While walking in the forest,
if you come across twice the same tree, you are lost !

atan(x,y) More.PNG



Let me count: One

one.png

... two ...

two.png

Oh! I see the same tree indicating atan(y/x) twice in the forest! At least I know now why you feel lost.

Again. You win: I have no way to stop you from trolling people. I can't stop you saying that this angle is 63.4349° and not 26.5651°.

Clipboard01.png

Best regards.
Alvaro.
  • New Posts New Posts
  • No New Posts No New Posts