Hello
I need some help to use text/string inside my function
I want to make a function that can solve 2 linear equations with 2 unknonws. At this moment my function inside my m. file looks like this (just below). But instead of (a1,b1,a2,b2) I want to write whole equations: Loesligninger('y=2x+1','y=3x-2'), and return a result like this:'x=3,y=7'
function s=LoesLigninger(a1,b1,a2,b2)A=[-a1,1;-a2,1];b=[b1;b2];s=A\b;s=inv(A)*b;end
Best Answer