MATLAB: Apply a formula and create a new matrix bookhomeworkmatlab functionmatrixmatrix manipulation Suppose I have 2 matrices : x = and y = I am not able to figure out the code that will output a matrix which calculates the following: Best Answer b.'*sum(A,2)sum(A,2).'*b % preferable thansum(A.'*b) % orsum(b.'*A) % orsum(A.*b,'all')ors = 0;for i=1:size(A,1) for j=1:size(A,2) s=s+A(i,j)*b(i); endends Related SolutionsMATLAB: Trying to do a summation of matrices sum((A(1:end-1) + A(2:end)) .* (B(1:end-1) + B(2:end))) MATLAB: Conversion formula I would assume you should look at the makecform and applycform function, as defined here: http://www.mathworks.com/help/toolbox/images/f8-20792.htmlThere are options to change from XYZ to Lab, which may be of some help! Related QuestionSum up elements in cellsBlack-Scholes formulaHow to plot the sums of the columns in a matrix using a for loopFormula for setting DiagonalsWhat is the best way to vectorize this matrix problemLinear Regression Code FormulaVectorized operation of sparse matrix[Formula][User Friendly]
Best Answer