标签: arrays vector vectorization octave
我想向量化此八度代码:
v = [10]; a = f(v^2) dx = 0.1; for i = 1:100 dv = a/v(i)*dx; v = [v, v(i)+dv]; endfor
a取决于v,而v取决于a。 我该怎么办?
a
v