what means this?

4 Ansichten (letzte 30 Tage)
CHAYUNG KIM
CHAYUNG KIM am 5 Okt. 2020
Bearbeitet: KSSV am 5 Okt. 2020
what means this?
  1. iter,eps
  2. x=-2:0.01:2
  3. plot(x,y1,'-b')
  4. err
  5. at last >fprintf('%2.0f&10.4f%10.4f%10.4%f10.4f/n', result);

Akzeptierte Antwort

KSSV
KSSV am 5 Okt. 2020
Bearbeitet: KSSV am 5 Okt. 2020
  1. iter,eps: iter is number of iterations. eps stand for a small value. So your code runs either for 10 iterations or till the error goes less than given eps.
  2. x=-2:0.01:2: This will create a array x from -2 to +2 with a difference of 0.01
  3. plot(x,y1,'-b'): This will plot the values of array x wrt to array y1.
  4. err : This is error variable.
  5. at last >fprintf('%2.0f&10.4f%10.4f%10.4%f10.4f/n', result): this is to print the respective values on the screen i.e on command window.
MATLAB is an easy language. You can check all those your self with out asking these simple questions.

Weitere Antworten (0)

Kategorien

Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by