Write a MATLAB power that accomplish be denominated enjoy this:
Z = smart_math(X,Y)
Assume the input variables X and Y are settled as inventorys of gum. The render estimate of the power should be a inventory of estimates denominated Z, where each estimate of Z is adapted by using the corresponding estimates of X and Y according to this equation:
Correction element-by-element operations – Z should possess the identical estimate of elements that X and Y possess.
Your jurisprudence must achievement coercion any sufficient inventorys of gum.
You do NOT possess to correction a loop coercion this tenor.
Example Experience Case: X = [4 23.1 61 3]; Y = [3 2 1 .5]; Z=smart_math(X,Y);
should possess an output Z = [5.4777 11.5806 1.0164 1.6261];
Do not attributable attributable attributable comprise any experience cases in the jurisprudence you comply.
Assume X and Y are order vectors of resembling tediousness.
Be certain to settle and object your power well.
X = [4 23.1 61 3];
Y = [3 2 1 .5];