MATLAB: I need to solve an equation which is dependent on another equation and get the required plot. How can i do that using block operator I need to code in matlab Best Answer Solve equation 1, store result in a variable, use said variable as input to equation 2? Here is a quick example~x = 0:0.1:5;y1 = 2*x + 3;y2 = 3*y1 - 2;plot(x,y2)title('y1 = f(x) y2 = f(y1)')legend('y2','location','southeast')xlabel('inputs')ylabel('outputs')Hope that helps? Related SolutionsMATLAB: How to solve a system of coupled differential equations If you setdx/dt = y1,theta = y2,dtheta/dt = y3,then you have to solvey1' = y1^2y2' = y3y3' = y1^2*sin(y2)using ODE45.Best wishesTorsten. MATLAB: Differential and Integral System Sety5=intg(y1-y3)y6=intg(y2-y4)Then your system becomes(1) y1'+a*(y1-y3)=0(2) y2'+b*(y2-y4)=0(3) y5 + c*y3- d*(y3*y4)=0(4) y6 + c*y4- e*(y3*y4)=0(5) y5'=y1-y3(6) y6'=y2-y4Use equations (3) and (4) to solve for y3 and y4.Best wishesTorsten. Related QuestionDraw multiple line segments, stairs(), plot() functionPlotyy making extra linesIs there such a matrix operator
Best Answer