Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Engineering LibreTexts

1.18: Example of Interactive Elements

( \newcommand{\kernel}{\mathrm{null}\,}\)

 Embedded MATLAB (running on Octave)

Login with LibreOne to run this code cell interactively.

If you have already signed in, please refresh the page.

% Problem 2: Degradation of Aqueous Bromide
clc; clear; close all;

% Given experimental data
t_exp = 10:10:60;
c_exp = [3.4 2.6 1.6 1.3 1.0 0.5];

%Create a plot of the experimental data with a red diamond shape
plot(t_exp, c_exp, "rd", 'LineWidth',3)

%Plot experimental and functional data on same axis system
hold on

%70m interval, point every 30s, 60s in a minute, so if start at 0 and go to
%70m, we should have 141 points

% Expected function
t_func = (0:0.5:70);
c_func = 4.84*exp(-0.034*t_func);

% Plot Functional Model
plot(t_func, c_func,'g--', 'LineWidth',3);
hold off

%Make Graph Pretty

title("Experimental Aq. Bromide Degredation", 'FontSize',18);
legend("Experimental Data", "Functional Model");
xlabel("Time [minutes]");
ylabel("Concentration [PPM]");
% Problem 2: Degradation of Aqueous Bromide
clc; clear; close all;

% Given experimental data
t_exp = 10:10:60;
c_exp = [3.4 2.6 1.6 1.3 1.0 0.5];

%Create a plot of the experimental data with a red diamond shape
plot(t_exp, c_exp, "rd", 'LineWidth',3)

%Plot experimental and functional data on same axis system
hold on

%70m interval, point every 30s, 60s in a minute, so if start at 0 and go to
%70m, we should have 141 points

% Expected function
t_func = (0:0.5:70);
c_func = 4.84*exp(-0.034*t_func);

% Plot Functional Model
plot(t_func, c_func,'g--', 'LineWidth',3);
hold off

%Make Graph Pretty

title("Experimental Aq. Bromide Degredation", 'FontSize',18);
legend("Experimental Data", "Functional Model");
xlabel("Time [minutes]");
ylabel("Concentration [PPM]");

Example of an Embedded Short Answer Discussion  

Discussion 0.1

 

Example of a Multiple Choice Question


1.18: Example of Interactive Elements is shared under a CC BY-NC 4.0 license and was authored, remixed, and/or curated by LibreTexts.

Support Center

How can we help?