MATLAB: How to make two conditions for a while loop l'hopitalwhile loop I'm making an application for L'hopitals rule so I need a while loop whenever the limit of f(x) and g(x) are both 0. How would I do that? This is what I have while(limit(a)=0 & limit(b)=0) Best Answer You need the == equalswhile(x==0 & y==0)For example: syms x y = x; f = x^2; if (limit(y,x,0)==0 & limit(f,x,0)==0) disp('true'); else disp('false'); end Related SolutionsMATLAB: Storing for loop nested value in a vector f = zeros(4,4,4);for i=0:3 for ii=0:3 for iii=0:3 f(iii+1,ii+1,i+1) = (i/2) + (ii/3) + (iii/4); end endendf = f(:); MATLAB: L’hopital rule doesn’t work You didn't assign diff(f(x)) and diff(g(x)) to anything. Related QuestionMake matlab differentiate until the conditions are metHow to create a vector by iterationWhat does a value of performance in a neural network indicate
Best Answer