MATLAB: How I solve equation which contain variables of two different vector

vectors

if I have a=[1 2 3]; b=[4 5 6]; d=(4*a)/(2*pi*b) I want to use the first element of (a) and (b) to calculate (d) then second…and so on. finally, the results need to be in a new vector, but instead of having VECTOR (d) it will give just one number. how can I get the result in vector (d) which contain the solution of any two elements od (a)and (b) thanks for helping.

Best Answer

d=(4*a)./(2*pi*b)
If you want all combinations of a and b then
[A,B] = ndgrid(a,b);
d = (4*A)./(2*pi*B);