Enable contrast version

# Tutor profile: Jack A.

Inactive
Jack A.
Tutor Satisfaction Guarantee

## Questions

### Subject:MATLAB

TutorMe
Question:

How would you make a while loop that will run no matter what for the first time then check a certain condition to see if it should continue to run?

Inactive
Jack A.

***NOTE: Code will be posted below the answer. In other programming languages, this is called a "do while" loop. The first iteration of the loop will run regardless of any condition then a condition will be checked at the end of the loop to see if the loop will run another iteration. We know that no matter what, the while loop has to run the first iteration. For this, we can put while 1. When matlab gets to this line, it will evaluate 1 as true and continue inside the while loop. Then you could insert the code you would want to run inside the while loop code block. The important part is the ending condition because this is how we will exit the loop and prevent an infinite loop. We need to use a break that will take us out of the loop we are in. But we only want to break out of the loop if a certain condition is met. For this, we will use an if statement. Inside of that if statement, we will type break which will take us out of the while loop. while 1 % Insert code you want to run if condition break; end % end of if statement end % end of while loop

### Subject:Trigonometry

TutorMe
Question:

Let's say I have a ladder that is 10 feet long and it is leaning against a vertical wall. Assume the angle between the ladder and the ground needs to be 75 degrees to ensure safe ladder operation. How far away from the wall does the ladder need to be placed to make sure it is safe to use.

Inactive
Jack A.

### Subject:Algebra

TutorMe
Question:

If you're having a hard time finding the roots of a quadratic equation by factoring, what other methods can you use to solve the quadratic equation?

Inactive
Jack A.

If you are having trouble factoring using the "X method" you could try completing the square. If you are still having trouble with completing the square, you can use the quadratic equation to solve for the zeros. The quadratic equation is nice because it takes the guessing out of solving for zeros and it also allows you to find imaginary zeros. Imaginary numbers are numbers you get from taking the square root of a number less than zero.

## Contact tutor

Send a message explaining your
needs and Jack will reply soon.
Contact Jack