cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

problems with the conditional operator

-MFra-
21-Topaz II

problems with the conditional operator

Hello everyone,
why the program, reported below, does not work? There seem to be problems with conditional operators. In fact the program on the right, where no conditional operators appear, gives the required result.
I sincerely thank those who will find the error and all those who will try to solve it.

Attached is the worksheet.

test 3.jpg

ACCEPTED SOLUTION

Accepted Solutions
-MFra-
21-Topaz II
(To:-MFra-)

Hello everyone!
I solved the problem this way:

test 3+.gif

test 3++.gif

View solution in original post

13 REPLIES 13
LucMeekes
23-Emerald III
(To:-MFra-)

The if() function and the if construct don't always work symbolically. The step function 'Phi()' may be a symbolic alternative:

LM_20191202_Conditional.png

Success!
Luc

-MFra-
21-Topaz II
(To:LucMeekes)

In this case, using the unit step is a real nonsense!

LucMeekes
23-Emerald III
(To:-MFra-)

You want something to work.... or not?

LM_20191203_Conditionally.png

Success!
Luc

LucMeekes
23-Emerald III
(To:-MFra-)

Incidentally, those simple theta's at the end of many of your if-blocks do not actually do something.

It's the final theta, at the end of the program that produces the result.

If you want your program to produce the result of the first if statement that is TRUE, you can use:

return theta

Where return is the programming construct, from the programming panel...

 

Success!
Luc

-MFra-
21-Topaz II
(To:LucMeekes)

... but it still doesn't work .....

 

 

LucMeekes
23-Emerald III
(To:-MFra-)

Sorry, I didn't want to suggest that changing it would solve your problem.
Luc
-MFra-
21-Topaz II
(To:LucMeekes)

The evaluation of the same logical equation in the comparisons takes on opposite values as seen in the photo, so nothing works.

test 4.jpg

LucMeekes
23-Emerald III
(To:-MFra-)

{Ah, picture cut & paste is back!}

Francesco, guarda qui:

LucMeekes_0-1575473105780.png

Successo!

Luc

 

-MFra-
21-Topaz II
(To:LucMeekes)

Luc,

thank you for the time and work dedicated to me, but your answer gives a different result from the one I expected and that you know what it is.

Werner_E
25-Diamond I
(To:LucMeekes)


@LucMeekes wrote:

{Ah, picture cut & paste is back!}

Yes and as I see you experience the same problem as I do: the inserted picture is far too small and of mediocre quality and looks rather bad. Its not inserted using the original dimension and is scaled differently compared to a pic inserted via "Insert Photo". 😞

 

!! The following is not contributing to this thread and is done for testing purposes only !!

Pic inserted via cut and paste:

Werner_E_0-1575488925347.png

 

Pic inserted using the "Insert Photos" button:

B.png

 

Pic inserted via cut & paste and the stretched to match approximately the size the above pic was automatically scaled to:

Werner_E_1-1575489041435.png

 

It looks like when we manually stretch the pic we get the a similar quality as when inserted via the button. Bad that we have to think about stretching the pic every time we insert one.

 

 

-MFra-
21-Topaz II
(To:Werner_E)

I wanted to say that I also always use "insert photos" and it is not clear to me why the mentioned problem arises that is of poor quality of the photo.

insert photo.jpg

LucMeekes
23-Emerald III
(To:-MFra-)

This is what I get with Cut & Paste:

LucMeekes_0-1575566068117.png

In this case any difference in/issue with 'picture quality' could also be related to the type (resolution?) of the computer screen.

That is not the case when I select and copy a couple of regions from an active Mathcad sheet and paste that in this edit window:

LucMeekes_1-1575566316242.png

That's one method, actually the one I prefer since it does not require the intermediate steps required when I take a screenshot, paste it in a picture editing program (Paint) and select a rectangular part, copy that and  - finally - paste that in this edit box. The result of all that is:

LucMeekes_2-1575566451794.png

I find the first, simpler method to result in a sharper picture.

 

But, we're running off the topic of this thread... sorry.

Luc

-MFra-
21-Topaz II
(To:-MFra-)

Hello everyone!
I solved the problem this way:

test 3+.gif

test 3++.gif

Announcements

Top Tags