MATLAB: Conditional equation X1=X(y==1) MATLAB I have a matrix X and a column vector y. When I write something like X1=X(y==1), I only get the numbers from the first column of X. How to get numbers from all others columns when y==1 ? Best Answer X1=X(y==1,:) Related SolutionsMATLAB: How to define a symbolic vector Yes!syms x1 x2x = [x1; x2]y = [0 1]*xproduces:y =x2 MATLAB: Coupled Second order differential eq. solution %Supposex1=xx2=x'x3=y%we get the systemdx1=x2dx2=x2/a*(f/c - b*(1-x2*x3/d)/x3) % You have to check your brackets dx3=1-x2*x3/d Related QuestionLoad x,yTrying to make a piecewise function that isn’t for graphing or using the piecewise function itselfSecond order differential eq. solutionPlot f(x,y) = (x+y+xy+1) / xy = 0
Best Answer