Suppose there are two variables. v1 = [1 2 3]; m1 = [1 2 3; 4 5 6]; I hope to create another matrix m2, having the same size with m1, and its (i, j) component is defined by m2(i…
Ask an expert. Trust the answer.
Academic and engineering questions answered by verified MATLAB professionals.
Suppose there are two variables. v1 = [1 2 3]; m1 = [1 2 3; 4 5 6]; I hope to create another matrix m2, having the same size with m1, and its (i, j) component is defined by m2(i…
hi i have two vectors diffrent lengths with diffrent values i want to match closest index in one vector to other example : v1 = [1610759986514 1610759986549 1610759986583 161…
Hi, I have a serious issue in matlab. I have 2 vectors v1 and v2 and length(v1) = 1376872, length(v2) = 1350228. Vector v2 contains information about position in the original co…
Hi there, my question could easily be solved with a simple loop but I'm curious if there is a nice genuine matlab way of doing this: I have a vector "v1" containing 10 entries. …
can anyone help me to construct this matrix blj=(-2)^j-l if lj …
I am trying to create an echelon function, however, I am having trouble debugging my error. It works for almost all matrices but for the following matrix it gives an incorrect resu…
My function file my_rref.m is as follows: function my_rref(A) [m,n]=size(A); for i=1:m-1 for j=i+1:m if abs(A(j,i))>abs(A(i,i)) t=A(j,:); A(j,:)=A(i,:); A(i,:)=t; end end end fo…
Hi, from the binary image above, I've tried drawing boundaries around the object and successfully counted them. But I'm thinking of trying another method which is to use the region…
Given a data set with support points x_1,...,x_n and corresponding y-values y_1,...,y_n. My objective is to create a cubic spline f (with natural boundary conditions) that passe…
How can I change a component size in MATLAB system composer by means of APIs (command line or MATLAB code) ?…