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

SOLVED
Topaz I

## 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.

1 ACCEPTED SOLUTION

Accepted Solutions

## Re: problems with the conditional operator

Hello everyone!
I solved the problem this way:

13 REPLIES 13

## Re: problems with the conditional operator

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

Success!
Luc

## Re: problems with the conditional operator

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

## Re: problems with the conditional operator

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

Success!
Luc

## Re: problems with the conditional operator

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

## Re: problems with the conditional operator

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

## Re: problems with the conditional operator

Sorry, I didn't want to suggest that changing it would solve your problem.
Luc

## Re: problems with the conditional operator

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

## Re: problems with the conditional operator

{Ah, picture cut & paste is back!}

Francesco, guarda qui:

Successo!

Luc

## Re: problems with the conditional operator

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.

## Re: problems with the conditional operator

@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:

Pic inserted using the "Insert Photos" button:

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

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.

## Re: problems with the conditional operator

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.

## Re: problems with the conditional operator

This is what I get with Cut & Paste:

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:

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:

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

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

Luc

## Re: problems with the conditional operator

Hello everyone!
I solved the problem this way:

Announcements
Check out the latest