Can someone help me create a script to solve the following?

I tried creating scripts to solve each question but I honestly have no idea what I'm doing, any help will be appreciated!

1 Comment

Have a look on roots to find the solution of quadratic equation.

Sign in to comment.

Answers (1)

Question 1 Answer
a= 1;
r= 1/7;
n= 6;
s = a*r.^(0:n-1);
later, you put format long to calculate the exact value.
Question 2 Answer
syms x;
eqn = (4*x^2 -32*x+64) == 0;
solx = solve(eqn,x)
or
a= 4;
b = -32;
c=64;
x(1) = (-b + sqrt(b^2 - 4*a*c))/(2*a);
x(2) = (-b - sqrt(b^2 - 4*a*c))/(2*a);
okay, i guess my hint is good enough for you to solve question 3.

6 Comments

Hey Kevin, is there anyway I can solve all 3 in question 1 simultaneously?
Please don't answer homework questions like this, posted with no effort made. You do not help the student, only convince them that Answers is here as a homework solving service.
No problem. It is ok if you want to guide someone to a solution. Give them some hints, fine if you can push them to a solution. A lot of time you find that a student was able to get close to a solution if they tried. But they need to do the main thinking.
Agree with what you say. I did't think that much before. "hard work pays off"., they should put some efforts on it if they are willing to learn.
So should I post what I did beforehand because I already had number 1 just didn’t know how to solve it simultaneously. Don’t like what was previously said about me not doing the script because if you look at my history I already got help with it and could fully explain how to do it.

Sign in to comment.

Products

Release

R2018a

Asked:

on 9 Oct 2018

Commented:

on 9 Oct 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!