Community Profile

photo

Fardin Khan


Active since 2019

Statistics

Content Feed

View by

Question


Why am I getting: "Index exceeds the number of array elements (1)." error?
function Euler2 (k, Ta, t0, T0, tn, n) h = (tn - t0)/n; t = t0; T = T0; for i=1:n T(i+1) = T(i) + (-k(T(i)-Ta)) * h; ...

5 years ago | 1 answer | 0

1

answer

Question


Why is my function outputting a blank graph:
function add(a, b, n) figure, hold on for i=1:n a = [a+2]; b = [b*2]; fprintf("%8.3f", a), fprintf("%19.4f\n", ...

5 years ago | 2 answers | 0

2

answers