MATLAB: How to divide matrices that print matrix matrix division clc;clear;v2=[0,45,85,100];t=[0,1.5,3,5];a =v2/t ;disp(a); I thought "a" would print out in matrix form which it did not. I need the answer in [a,b,c,d] form. Best Answer Trya = v2 ./ t % Use dot-slash ./ instead of /No disp(a) needed if you leave off the semicolon. Related SolutionsMATLAB: For loop to matrix Don't need a for loop. Do it like this:V1=49:2:99;V2=zeros(1,numel(V1));V3=50*ones(1,numel(V1));b=[V1;V2;V3];y=L\b;x=U\y;Then each answer is stored as a separate column of x. MATLAB: How to define an arbitrary constant for equations If you are talking about making an assumption, you can do it as follows:v1=6;v3=18;syms v2 v4 v5 v6eqn1= -v4+v5==-v3;eqn2= -v2+v6==v3;eqn3= -v5-v6==-v1;assume(v6~=0)[v2 v4 v5 v6]=solve(eqn1, eqn2, eqn3);[v2 v4 v5 v6] Related QuestionHow to Write a program that prints out the numbers 5 through -5 in decreasing order.Solving 8-equations system in 8 variables with lsqnonlin()How to insert multiple vectors as diagonals in the same matrixReshuffle a symmetric matrix
Best Answer