Can someone help me create a script to solve the following?
Afficher commentaires plus anciens


I tried creating scripts to solve each question but I honestly have no idea what I'm doing, any help will be appreciated!
1 commentaire
KSSV
le 9 Oct 2018
Have a look on roots to find the solution of quadratic equation.
Réponses (1)
Kevin Chng
le 9 Oct 2018
Modifié(e) : Kevin Chng
le 9 Oct 2018
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 commentaires
Kevin Seetaram
le 9 Oct 2018
John D'Errico
le 9 Oct 2018
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.
Kevin Chng
le 9 Oct 2018
All right, i got it.
John D'Errico
le 9 Oct 2018
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.
Kevin Chng
le 9 Oct 2018
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.
Kevin Seetaram
le 9 Oct 2018
Catégories
En savoir plus sur Code Performance dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!