This course provides an introduction to engineering computer applications with specific emphasis on Matlab. Students learn how to navigate the Matlab environment and create professional engineering graphics. Programming is taught with application to numerical solution of mathematical and engineering problems. Prerequisites GE 206 and MTH 271.
This course provides an introduction to engineering computer applications with specific emphasis on Matlab. Students learn how to navigate the Matlab environment and create professional engineering graphics. Programming is taught with application to numerical solution of mathematical and engineering problems. Prerequisites: GE 206 and MTH 271.
Kermit Sigmon. MATLAB Primer. Third Edition, 1993.
Harold Abelson and Gerald J. Sussman with Julie Sussman. Structure and Interpretation of Computer Programs. Second Edition. MIT Press, 1996.
input command ... type help input to learn about it),x with values 1, 2,, ... ,1000;x that is at index 507 to equal 49.x array, and assigns the result to y.y is greater than 1e4 ($10^4$), display the string 'acheivement unlocked'. Otherwise, display the string 'no. just, no.'.x, in the standard basis $(e^i)$, transforms it to the $(b^i)$-basis, and assigns it to the vector coordinate tuple (array) y.randn. Generate a 20 by 1 array that contains elements that have an increasing number of samples for the estimate. The first element is the estimate after 10 samples, and each element thereafter is the estimate after 10 more samples.20 by 1 array of random integers (including zero) with uniform probability density function ranging from -5 to 5. When evaluating each element, if the element is positive, print +; if negative, print -; if zero, print 0.rect_int that performs numerical integration on input data as follows. Let there be four inputs: (1) data for the one-dimensional data array to be integrated, (2) delta_t for the scalar time steps between each data point, (3) lower time limit of integration, and (4) upper time limit of integration. Estimate the integral of data over time using the rectangular rule that you learned in calculus.rect_int to estimate the integral of tanh from 0 to 3 using 100 rectangles.mid_int that uses the midpoint rule.trap_int that uses the trapezoid rule.program file rectangular rule
5. Turn the edge colors off so that the mesh isn't shown. Use the hot colormap and use lighting. Use a colorbar.Write a function with arguments a time array t, "data" y that is approximately sinusoidal, and the angular frequency of that data omega. The function should return an array [a1, a2, a3] where the elements of the array give the linear least-squares best-fit for the function $$y(t) = a_1 + a_2 \cos(\omega t) + a_3 \sin(\omega t).$$ Test your function on this data, which has angular frequency $\omega = 2\pi\ rad/s$. Your writeup should show the results of this, including a plot of the noisy data and your analytic least-squares approximation. (Note: this used to say $\omega = 1\ rad/s$, which was totally incorrect.)
Write a script that numerically solves the differential equation $$ \ddot{x} + 2 \zeta \omega_n \dot{x} + \omega_n^2 x = f(t), $$ for $x(t)$. Let $f(t)$ be the function $$ f(t) = A \sin{\omega t}, $$ where $A$ is the drive amplitude and $\omega$ is the drive frequency. Use initial conditions $x(0) = 1$ and $\dot{x}(0) = 0$. Show a plot of $x(t)$ for the case that $\zeta = 0.5$, $\omega_n = 20 \pi\ rad/s$, $A = 1/2$, and $\omega = 10 \pi\ rad/s$.
text_to_code that converts an input string of English text to international Morse code. It should output an equivalent binary string of ones and zeros—a character for each "unit" of time—with a 1 representing the "on" state and a 0 representing the "off" state. A separate function code_to_blink should be written that takes the output of this string and displays a visual representation (e.g. blinking "light"). Finally, write a script that uses these two functions to visualize the Morse code of the following paragraph (from Kierkegaard's Purity of Heart is to Will One Thing).steady-state Purity of Heart is to Will One Thing
Is not despair simply double-mindedness? For what is despairing other than to have two wills? For whether the weakling despairs over not being able to wrench himself away from the bad, or whether the brazen one despairs over not being able to tear himself completely away from the Good: they are both double-minded, they both have two wills. Neither of them wills one thing, however desperately they may seem to will it.
Write a function write_paragraph that writes a paragraph. It should take as its input the number of sentences in the paragraph and return as its output the sentences as a single string.
Hint #1: "Teach" your function how to construct a sentence by giving it a sample text. You might consider using this text, which is Sartre's essay Existentialism is a Humanism. The m-file has a single variable text that is a single, long string of the entire text.
Existentialism is a Humanism
Hint #2: Build a graph that consists of nodes that are each word in the sample text and edges that represent the relation can be followed by. For example, the sample text contains the word merely five times. These five times, it is followed by the word an, means, disguising, voluntary, or formal, (notice the punctuation in the last of these).
nodes edges can be followed by
Hint #3: We can convert the large string to a cell array of words with the strsplit function. I recommend leaving the punctuation at the end of the words in which they appear in the text.
Hint #4: We can initialize a directed graph (digraph) object in MATLAB with the function digraph (e.g. G = digraph;). We can add an edge (and any new nodes required for the edge) with the function addedge. Be sure to use it with a syntax like G = addedge(G, 'existentialism','is') that re-defines G.
Hint #5: To initialize the write_paragraph function, randomly select a word from the graph with a capital letter as its first letter. Subsequent words should be added at random from those that are children (heads) of the current word (tail).
Hint #6: In order to know how many sentences you've built, you must know whenever you have a trailing period at the end of the most-recently selected word.
Hint #7: We cannot add an edge to the graph twice, and if we attempt to do so, MATLAB will return an error. This is problematic. One way to deal with this is to use the try block (see documentation).
Hint #8: More information on graphs in MATLAB can be found here.
No assignments found.
Class resources will be posted here throughout the semester.
Weekly homework will be due in class on Wednesdays, and it will be turned in for credit.
Working in groups on homework is strongly encouraged, but no copying is permitted.
The midterm and final exams will be in-class. If you require any specific accommodations, please contact me.
Calculators will be allowed. Only ones own notes and the notes provided by the instructor will be allowed. No communication-devices will be allowed.
The final exam will be cumulative.
Total grades in the course may be curved, but individual homework quizzes and exams will not be. They will be available on moodle throughout the semester.
Homework quizzes 25% Midterm Exam 35% Final Exam 40%
Cheating or plagiarism of any kind is not tolerated and will result in a failing grade (“F”) in the course. I take this very seriously. Engineering is an academic and professional discipline that requires integrity. I expect students to consider their integrity of conduct to be their highest consideration with regard to the course material.
In keeping with the standards of the Department of Mechanical Engineering, each course is evaluated in terms of its desired outcomes and how these support the desired program outcomes. The following sections document the evaluation of this course.
Upon completion of the course, the following course outcomes are desired
The desired program outcomes are that mechanical engineering graduates have
The following table correlates the desired course outcomes with the desired program outcomes they support.
| desired program outcomes | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| A | B | C | D | E | F | G | H | I | J | K | ||
| desired course outcomes | 1 | ✔ | ✔ | ✔ | ✔ | ✔ | | | | | ✔ | ✔ |
| ✔ | ✔ | ✔ | ✔ | ✔ | | | | | ✔ | ✔ | ||
| ✔ | ✔ | ✔ | ✔ | ✔ | | | | | ✔ | ✔ | ||
| ✔ | ✔ | ✔ | ✔ | ✔ | | | | | ✔ | ✔ | ||
| ✔ | ✔ | ✔ | ✔ | ✔ | | | | | ✔ | ✔ | ||
| ✔ | ✔ | ✔ | ✔ | ✔ | | | | | ✔ | ✔ | ||
| ✔ | ✔ | ✔ | ✔ | ✔ | | | | | ✔ | ✔ | ||
| ✔ | ✔ | ✔ | ✔ | ✔ | | | | | ✔ | ✔ | ||
| ✔ | ✔ | ✔ | ✔ | ✔ | | | | | ✔ | ✔ | ||
Saint Martin's University is a community of faculty, students and staff engaged in the exchange of ideas in the ongoing pursuit of academic excellence. Essential to our mission is a focused commitment to scholarly values and intellectual integrity, and a respect for the ideas, beliefs and work of others. This commitment extends to all aspects of academic performance. All members are expected to abide by ethical standards both in their conduct and their exercise of responsibility to themselves and toward other members of the community. As an expression of our shared belief in the Benedictine tradition, we support the intellectual, social, emotional, physical and spiritual nurturing of students.
Saint Martin's University defines academic dishonesty as violating the academic integrity of an assignment, test and/or evaluation of any coursework. This dishonest practice occurs when you seek to gain for yourself or another an academic advantage by deception or other dishonest means. You have a responsibility to understand the requirements that apply to particular assessments and to be aware of acceptable academic practice regarding the use of material prepared by others. Therefore, it is your responsibility to be familiar with the policies surrounding academic dishonesty as these may differ from other institutions.
Any use of technology that misleads a reviewer in assessing the student's mastery of a specific set of skills or knowledge is a type of intellectual dishonesty, that is, a type of cheating. Students who are unsure about the appropriateness of using an artificial intelligence tool (or "AI") must check with the instructor before using it. This includes the use of tools that generate text, images, video, code, and other works. If you are permitted by your instructor to use one or more AI tools in producing your work, you must disclose the use of that tool. You should say which tool you used and how you used it. Then if you use specific AI generated content (text, images, videos, audio, code, and so on) you must cite it in the style (APA, MLA, and so on) specified by your instructor.
If you are absent from class due to university-sanctioned activities, such as sports, it is your responsibility to request that the absence be excused; otherwise, the absence will be recorded as unexcused. Absent students are responsible for catching up with the class, and if any assignments are due on the day of the absence, it is your responsibility to turn in the assignments on time (prior to class). Assignments may be submitted as an attachment to the instructor's email address.
There may be times, as a college student, when personal stressors interfere with academic performance and daily life. The Counseling and Wellness Center supports students by addressing mental and emotional well-being with FREE and CONFIDENTIAL services. To schedule an appointment, call 360-688-2016, or email counselingcwc@stmartin.edu, or stop by the CWC (1st floor St. Raphael Center). If you would rather not go to the CWC or need support in the evenings and weekends, please consider using the TimelyCare app (timelycare.com/smusaints) to speak with a mental health provider, free, 24/7, from your phone or computer. We are honored to provide individual and group therapy to hundreds of students every year. Please reach out if you feel our services might support your wellness.
The Center for Student Success offers free academic services for all Saint Martin's students. The Center provides subject-area peer tutoring in science, technology, nursing, engineering, math, business, accounting, economics, world languages and other subjects. At the Writing Center, students meet with writing tutors to discuss their academic, personal, and professional writing. The Advising Center works with students on academic advising, connecting with campus support resources, transition and self-exploration guidance, personalized academic improvement plans, learning workshops, and support for changing majors. Disability Support Services is also located in the Center for any student with a disability who needs accommodations. For more information on the Center for Student Success, or to sign up for a tutoring, advising, or DSS meeting, see the website: https://www.stmartin.edu/directory/offices-departments-directory/center-student-success
Saints Care is a student support network bringing together campus partners—faculty, staff, families and students—to foster the success of each student in their navigation of campus life. Faculty, staff, students, and community members are welcome to submit a Saints Care Referral at https://www.stmartin.edu/saints-care for any reason; including, but not limited to:
Recognizing and embracing diversity is an essential part of academic life and learning. At Saint Martin's, our Catholic mission and Benedictine charism call us to welcome and embrace all who enter our university. We promote the transcendent dignity of the human person and commit ourselves to fostering an inclusive and global learning environment. Our respect for persons means we welcome the similarities and differences that comprise our students, faculty, and staff; we open ourselves to the profound change that different cultures, traditions, and beliefs can have on our practice of community; and we educate students to transform our world for peace and justice. We support our students in their navigation of university life, addressing issues of conflict through the ARC Reporting System (Accountability, Responsibility, and Community) to restore community. Saint Martin's offers multiple offices and resources to promote diversity across campus. The Chief Diversity Officer, Dr. John P. Hopkins, is available at jhopkins@stmartin.edu. All are welcome in the Dignity Center Lounge, located in Harned Hall, 207.
Saint Martin's University, in honor of the sacredness of the individual, and being deeply rooted in the Catholic Benedictine tradition of higher education, values the many religious and spiritual practices of our campus community. Saint Martin's University supports our students in their ongoing journey of becoming. In compliance with Washington State Law RCW 28B.137.010, Saint Martin's University reasonably accommodates students for reasons of religious observances.
Your experience in this class is important to me. If you have already established accommodations with Disability Support Services (DSS), please communicate your approved accommodations to me at your earliest convenience so we can discuss your needs in this course. If you have not yet established services through DSS, but have a temporary health condition or permanent disability that requires accommodations (conditions include but are not limited to mental health, attention-related, learning, vision, hearing, physical or health impacts), you are welcome to contact DSS at 360-438-4580 or smu.dss@stmartin.edu. DSS offers resources and coordinates reasonable accommodations for students with disabilities and/or temporary health conditions. Reasonable accommodations are established through an interactive process between you, your instructor(s) and DSS. It is the policy and practice of Saint Martin's University to create inclusive and accessible learning environments consistent with federal and state laws.
Saint Martin's University is committed to providing an environment free from sex discrimination, including sexual harassment and sexual violence. There are Title IX/sexual harassment posters around campus that include the contact information for confidential reporting and formal reporting. Confidential reporting is where you can talk about incidents of sexual harassment and gender-based crimes including sexual assault, stalking, and domestic/relationship violence. Confidential resources include the Counseling and Wellness Center (1st floor St. Raphael Center) or the Student Health Center (Burton Hall 102). These confidential resources can help you without having to report your situation to the formal reporting process via the Interim Dean of Students – Ms. Ann Adams, Title IX Coordinator & Associate VP of Human Resources – Ms. Cynthia Johnson, and/or Public Safety – Ms. Sharon Schnebly unless you request that they make a report. Please be aware that, in compliance with Title IX and under the Saint Martin's University policies, educators must report incidents of sexual harassment and gender-based crimes including sexual assault, stalking, and domestic/relationship violence. I appreciate that you feel comfortable talking with me. No one deserves to experience such behavior. Please know that our conversation is not confidential, but it is private. As someone who cares about your safety and well-being, I want you know that I have a responsibility to tell a member of the Title IX Team (listed above) so that he/she is aware and can provide you with information about options available to you regarding your safety and access to support services