pH.m - function pH i=input'= while i ~= 0 clc,clear e=0 g=0 acido=0 basico=0 neutro=0 N=input'ingrese la cantidad de datos while N <= 0 N=input'ingrese

# pH.m - function pH i=input'= while i ~= 0 clc,clear e=0 g=0...

• Lab Report
• 1

This preview shows page 1 out of 1 page.

function pH i=input('='); while i ~= 0 clc,clear e=0; g=0; acido=0; basico=0; neutro=0; N=input('ingrese la cantidad de datos:'); while N <= 0 N=input('ingrese la cantidad de datos:'); end for g=1:N n=input('ingrese el pH='); while 0 >= n n=input('ingrese el pH='); end while n > 14 n=input('ingrese el pH='); end if n < 7 acido = acido+1; else if n == 7 neutro = neutro+1; else if n <= 14 basico = basico+1; end end end e=e+n; pH=e/N; end fprintf('\nLa cantidad de acidos son: %g\n',acido) fprintf('\nLa cantidad de bases son: %g\n',basico)

Unformatted text preview: fprintf('\nLa cantidad de neutros son: %g\n',neutro) if pH &lt; 7 fprintf('El promedio es %1.2f por lo el tanto el pH es acido\n',pH) else if pH == 7 fprintf('El promedio es %1.2f por lo el tanto el pH es neutro\n',pH) else if pH &lt;= 14 fprintf('El promedio es %1.2f por lo el tanto el pH es basico\n',pH) end end end i=input('='); end disp('-----------PROGRAMA FINALIlZADO------') end...
View Full Document

• Winter '14
• Elmer LOPEZ GUTIERREZ

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern