Skip to main content
Engineering LibreTexts

1.18: Example of Interactive Elements

  • Page ID
    89922
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

     Embedded MATLAB (running on Octave)

    % 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.

    • Was this article helpful?