Can someone help me create a script to solve the following?
12 views (last 30 days)
Show older comments


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
Answers (1)
Kevin Chng
on 9 Oct 2018
Edited: Kevin Chng
on 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 Comments
Kevin Chng
on 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.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!