So I do have a function, which has the (same sized) vectors x,y,z as input parameters and a same sized k as an output parameter.
Now I want to calculate k with a simple for loop. As I come from other languages I could get it to run. However it is pretty slow and I know MATLAB has a lot of tricks for these kind of stuff.
So the minimal running example code is:
[r,c] = size(T);
k = zeros(r,c);
k(i) = A(i)+Bs(i).*x_s(i);
k(i) = 0.001;
Does MATLAB have a more efficient way to implement this?
Thanks in advance