Enable contrast version

Tutor profile: Jack A.

Inactive
Jack A.
Mechanical Engineering Undergraduate Student
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.
Answer:

***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.
Answer:

Think of the ladder, the ground, and the wall making a triangle. The length of the ladder is going to be the hypotenuse of the triangle because it is the shortest distance between the two ends of a ladder. We know the length of the ladder and we know that the angle between the ladder and the ground needs to be 75 degrees. We can use this information to calculate how far away from the wall the ladder needs to be. We know that the opposite side of the angle is the vertical height (which we are not interested in for this problem). We know the horizontal distance between the bottom of the ladder and the wall is adjacent to the angle. And we know that the hypotenuse is the length of the ladder. Using the length of the ladder and the angle between the horizontal and the ladder, we can calculate the horizontal distance using the cosine function. We know that cosine(theta) = adjacent/hypotenuse and we want to solve for adjacent. Rearranging that equation, we get adjacent = cosine(theta) * hypotenuse. Plugging everything in we get adjacent = cosine(75degrees) * 10ft = 2.59 ft away from the wall.

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.
Answer:

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

Request lesson

Ready now? Request a lesson.
Start Lesson

FAQs

What is a lesson?
A lesson is virtual lesson space on our platform where you and a tutor can communicate. You'll have the option to communicate using video/audio as well as text chat. You can also upload documents, edit papers in real time and use our cutting-edge virtual whiteboard.
How do I begin a lesson?
If the tutor is currently online, you can click the "Start Lesson" button above. If they are offline, you can always send them a message to schedule a lesson.
Who are TutorMe tutors?
Many of our tutors are current college students or recent graduates of top-tier universities like MIT, Harvard and USC. TutorMe has thousands of top-quality tutors available to work with you.