Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

IN MATLAB, use sprintf to find percent composition of alcohol % Given the follow

ID: 3794560 • Letter: I

Question

IN MATLAB, use sprintf to find percent composition of alcohol

% Given the following variables, use sprintf to come up with

% a well formatted output for the percent composition of an alcohol to two

% significant figures. For example, a sample output should be:

% Methanol is 38.69% C, 9.76% H and 51.55% O.

% https://en.wikipedia.org/wiki/Relative_atomic_mass#Periodic_table_with_relative_atomic_masses

% ChemicalName = 'Propanol'

% MassOfCarbon = 36.03;

% MassOfHydrogen = 8.08;

% MassOfOxygen = 16.00;

Explanation / Answer

Since i do not have matlab compiler but my language understadning says that the

Escape characted should work like in c language.