I want to make an iteration for all arras of my vector.
2 views (last 30 days)
Mohammad Sadegh Nasirianfar on 17 May 2022
C_n = (1./sigmaprimevo/10).^n;
my code is as above. I want to assume 1 in the first step for all arrays of n. after that n has to be calculated considering the I_c values. This has to be continued till change in n less than 0.01 (deltan<0.01). how can I write that?
Jan on 17 May 2022
ready = false;
nOld = n;
... Your code as above
ready = all((n - nOld) < 0.01)
% Or maybe: sum(abs(n - nOld) < 0.01
% or maybe: max(abs(b - nOld) < 0.01
% or what ever the criterion is