MATLAB: How to translate the following code from Mathematica to Matlab mathematicatable I need to construct a matrix similar to the following: l = 2; m = 4; Table[(2 x – y*l)/m, {x, 0, 5}, {y, 0, 5}] // MatrixForm How can I do that in Matlab? Best Answer Thank you all for the answersI've found a generic (edit: specific) way through the following script (with the above example illustrated)a=1; b=100;format raty=zeros(5,5);for l=1:5 for m=1:5 y(l,m)=1/(a*((b-1)*l)/((b+1)*l+1))*KroneckerDelta(l,m) end;end; Related SolutionsMATLAB: Can someone help me with the code? It giving me an error in line 2 saying that it doesn’t exist or it inst able to enter it in as x. Show us how you're calling the function and what you're passing in for x. Like in your main program do this% define xx = ...... whatever you dowhos x % Let's see what it isy = bubble( x )Then come back here and paste the results of the "whos" command that will show up in the command window. MATLAB: “Contour not rendered for non-finite ZData” warning, working fine on Mathematica [x,y] = meshgrid(-5:0.25:5);z = (x.^2 + y.^4)./sqrt(4.*x.^2 + 4.*y.^2);contour3(x,y,z)YOu forgot to put ./ (element by element division) between numerator and denominator. Related QuestionHow to pass arguments from a matrix to a functionWhere to put the period in this expressionAssign 3-by-1 matrix to image 3D matrixCan’t understand why does it say “The expression to the left of the equals sign is not a valid target for an assignment.”I have no idea how to start this question
Best Answer