Skip to content

Commit ce832bd

Browse files
committed
Initial push of first release version of systems engineering.
0 parents  commit ce832bd

File tree

65 files changed

+1416
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1416
-0
lines changed

.gitattributes

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
*.fig binary
2+
*.mat binary
3+
*.mdl binary diff merge=mlAutoMerge
4+
*.mdlp binary
5+
*.mexa64 binary
6+
*.mexw64 binary
7+
*.mexmaci64 binary
8+
*.mlapp binary linguist-language=MATLAB
9+
*.mldatx binary
10+
*.mlproj binary
11+
*.mlx binary merge=mlAutoMerge linguist-language=MATLAB
12+
*.p binary
13+
*.sfx binary
14+
*.sldd binary
15+
*.slreqx binary merge=mlAutoMerge
16+
*.slmx binary merge=mlAutoMerge
17+
*.sltx binary
18+
*.slxc binary
19+
*.slx binary merge=mlAutoMerge linguist-language=Simulink
20+
*.slxp binary
21+
22+
## Other common binary file types
23+
*.docx binary
24+
*.exe binary
25+
*.jpg binary
26+
*.pdf binary
27+
*.png binary
28+
*.xlsx binary
29+
30+
# Ignore HTML
31+
32+
*.html linguist-detectable=false

.github/workflows/ci.yml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
name: MATLAB Build
2+
3+
# Controls when the action will run.
4+
on:
5+
push:
6+
branches: [ release ]
7+
pull_request:
8+
branches: [ release ]
9+
workflow_dispatch:
10+
11+
# Add permission to write GitHub pages
12+
permissions:
13+
contents: write
14+
pages: write
15+
id-token: write
16+
17+
jobs:
18+
test:
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
MATLABVersion: [R2024a,R2024b]
23+
runs-on: ubuntu-latest
24+
steps:
25+
# Checks-out your repository
26+
- uses: actions/checkout@v4
27+
28+
# Sets up a display server
29+
- name: Start display server
30+
if: ${{ always() }}
31+
run: |
32+
sudo apt-get install xvfb
33+
Xvfb :99 &
34+
echo "DISPLAY=:99" >> $GITHUB_ENV
35+
36+
# Sets up MATLAB
37+
- name: Setup MATLAB
38+
uses: matlab-actions/setup-matlab@v2
39+
with:
40+
release: ${{ matrix.MATLABVersion }}
41+
products: MATLAB Simulink Simscape
42+
43+
44+
45+
# Run all the tests
46+
- name: Run SmokeTests
47+
uses: matlab-actions/run-command@v2
48+
with:
49+
command: openProject(pwd); RunAllTests;
50+
51+
# Upload the test results as artifact
52+
- name: Upload TestResults
53+
if: ${{ always() }}
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: TestResults_${{ matrix.MATLABVersion }}
57+
path: ./public/*
58+
overwrite: true
59+
60+
badge:
61+
if: ${{ always() }}
62+
needs: [test]
63+
strategy:
64+
fail-fast: false
65+
runs-on: ubuntu-latest
66+
steps:
67+
68+
# Checks-out your repository
69+
- uses: actions/checkout@v4
70+
71+
# Sets up R2023b
72+
- name: Setup MATLAB
73+
uses: matlab-actions/setup-matlab@v2
74+
with:
75+
release: R2024b
76+
77+
# Download the test results from artifact
78+
- name: Download All TestResults
79+
uses: actions/download-artifact@v4
80+
with:
81+
path: public
82+
pattern: TestResults_*
83+
merge-multiple: true
84+
85+
# Create the test results badge
86+
- name: Run PostSmokeTest
87+
uses: matlab-actions/run-command@v2
88+
with:
89+
command: openProject(pwd); PostSmokeTest;
90+
91+
# Deploy reports to GitHub pages
92+
- name: Setup Pages
93+
uses: actions/configure-pages@v5
94+
- name: Upload pages artifact
95+
uses: actions/upload-pages-artifact@v3
96+
with:
97+
path: public
98+
- name: Deploy to GitHub Pages
99+
id: deployment
100+
uses: actions/deploy-pages@v4
101+
102+
# Commit the JSON for the MATLAB releases badge
103+
- name: Commit changed files
104+
continue-on-error: true
105+
run: |
106+
git config user.name "${{ github.workflow }} by ${{ github.actor }}"
107+
git config user.email "<>"
108+
git pull
109+
git add Images/TestedWith.json
110+
git commit Images/TestedWith.json -m "Update CI badges ${{ github.ref_name }}"
111+
git fetch
112+
git push

.gitignore

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# List of untracked files to ignore
2+
3+
# Autosave files
4+
*.asv
5+
*.m~
6+
*.autosave
7+
*.slx.r*
8+
*.mdl.r*
9+
10+
# MATLAB Drive
11+
*.MATLABDriveTag
12+
13+
# Compiled files
14+
*.mex*
15+
*.p
16+
17+
# Compressed files
18+
*.zip
19+
20+
# Packaged app and toolbox files
21+
*.mlappinstall
22+
*.mltbx
23+
24+
# Deployable archives
25+
*.ctf
26+
27+
# Generated helpsearch folders
28+
helpsearch*/
29+
30+
# Defined Simulink cache folder
31+
Utilities/SimulinkCache/*
32+
33+
# Standard code generation folders
34+
slprj/
35+
sccprj/
36+
codegen/
37+
38+
# Code generation file
39+
*.eep
40+
*.elf
41+
*.hex
42+
*.bin
43+
44+
# Cache files
45+
*.slxc
46+
47+
# Project settings
48+
Utilities/ProjectSettings.mat
49+
50+
# Build tool trace
51+
.buildtool/
52+
derived/
53+
54+
# GitLab page folder
55+
public/

.gitlab-ci.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
stages:
2+
- test
3+
- deploy
4+
- release
5+
6+
.setup_matlab_linux: &setup_matlab_linux
7+
# install gstreamer libraries for audio/video file support
8+
- export DEBIAN_FRONTEND=noninteractive && apt-get update -y && apt-get install --no-install-recommends -y libgstreamer1.0-0 gstreamer1.0-tools gstreamer1.0-libav gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly
9+
- apt-get clean && apt-get -y autoremove && rm -rf /var/lib/apt/lists/*
10+
- export MLM_LICENSE_TOKEN="$LICENSEOWNER|$LICENSELABEL|$LICENSETOKEN" # Set the batch token license
11+
- apt-get update
12+
- apt-get install --no-install-recommends --yes git wget ca-certificates xvfb
13+
- wget -q https://www.mathworks.com/mpm/glnxa64/mpm -P /opt/
14+
- chmod +x /opt/mpm
15+
- /opt/mpm install --release=$VERSION --destination=/opt/matlab --products=MATLAB $PRODUCT
16+
- wget -O /opt/matlab/bin/matlab-batch https://ssd.mathworks.com/supportfiles/ci/matlab-batch/v1/glnxa64/matlab-batch
17+
- chmod +x /opt/matlab/bin/matlab-batch
18+
19+
.setup_matlab_windows: &setup_matlab_windows
20+
- $env:MLM_LICENSE_TOKEN="$LICENSEOWNER|$LICENSELABEL|$LICENSETOKEN" # Set the batch token license
21+
- Set-Alias -Name matlab -Value "D:\MATLAB\$VERSION\bin\matlab-batch"
22+
23+
# test-linux:
24+
# image: mathworks/matlab-deps:latest
25+
# variables:
26+
# PRODUCT: "Curve_Fitting_Toolbox Simscape Simscape_Battery Simscape_Electrical Simulink Statistics_and_Machine_Learning_Toolbox Symbolic_Math_Toolbox"
27+
# parallel:
28+
# matrix:
29+
# - VERSION: [R2024b]
30+
# tags:
31+
# - training
32+
# - linux
33+
# - docker
34+
# stage: test
35+
# script:
36+
# - *setup_matlab_linux
37+
# - xvfb-run /opt/matlab/bin/matlab-batch "openProject(pwd); buildtool -continueOnFailure test:scripts test:models;"
38+
# allow_failure: true
39+
# artifacts:
40+
# name: "Linux$VERSION"
41+
# paths:
42+
# - public/*
43+
44+
test-windows:
45+
parallel:
46+
matrix:
47+
- VERSION: [R2024b]
48+
tags:
49+
- training
50+
- windows
51+
stage: test
52+
script:
53+
- *setup_matlab_windows
54+
- matlab "openProject(pwd); buildtool -continueOnFailure test-scripts test-models;"
55+
allow_failure: true
56+
artifacts:
57+
name: "Windows$VERSION"
58+
paths:
59+
- public/*
60+
when: always
61+
62+
# test-internal:
63+
# variables:
64+
# VERSION: "R2024b"
65+
# PRODUCT: ""
66+
# tags:
67+
# - training
68+
# - linux
69+
# - docker
70+
# stage: test
71+
# script:
72+
# - *setup_matlab_linux
73+
# - git clone https://ci-token:${GROUP_ACCESS_TOKEN}@insidelabs-git.mathworks.com/modular-curriculum-content/utilities.git internal-utilities -b ez-dev
74+
# - xvfb-run /opt/matlab/bin/matlab-batch "openProject(pwd); addpath(genpath('internal-utilities')); buildtool -continueOnFailure test:internal;"
75+
# allow_failure: true
76+
# artifacts:
77+
# name: "CMTests"
78+
# paths:
79+
# - public/*
80+
81+
pages:
82+
tags:
83+
- training
84+
- windows
85+
stage: deploy
86+
variables:
87+
VERSION: "R2024b"
88+
script:
89+
- *setup_matlab_windows
90+
- matlab "openProject(pwd); buildtool -continueOnFailure deploy-generate deploy-edit;"
91+
allow_failure: true
92+
artifacts:
93+
paths:
94+
- public

CONTRIBUTING.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Contributing
2+
3+
>_If you believe you have discovered a security vulnerability, please **do not** open an issue or make a pull request. Follow the instructions in the [SECURITY.md](SECURITY.md) file in this repository._
4+
5+
Thank you for your interest in contributing to a MathWorks repository! We encourage contributions large and small to this repository.
6+
7+
**Contributions do not have to be code!** If you see a way to explain things more clearly or a great example of how to use something, please contribute it (or a link to your content). We welcome issues even if you don't code the solution. We also welcome pull requests to resolve issues that we haven't gotten to yet!
8+
9+
## How to give feedback
10+
* **Send us an email:** Contact the [MathWorks teaching resources team.](mailto:[email protected])
11+
* **Open an issue:** Start by [creating an issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/creating-an-issue) in the repository that you're interested in. That will start a conversation with the maintainer. When you are creating a bug report, please include as many details as possible. Please remember that other people do not have your background or understanding of the issue; make sure you are clear and complete in your description.
12+
13+
## How to contribute to the repository
14+
* **Work in your own public fork:** If you choose to make a contribution, you should [fork the repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo). This creates an editable copy on GitHub where you can write, test, and refine your changes. We suggest that you keep your changes small and focused on the issue you submitted.
15+
* **Sign a Contributor License Agreement (CLA):** We require that all outside contributors sign a [CLA](https://en.wikipedia.org/wiki/Contributor_License_Agreement) before we can accept your contribution. When you create a pull request (see below), we'll reach out to you if you do not already have one on file. Essentially, the CLA gives us permission to publish your contribution as part of the repository.
16+
* **Make a pull request:** "[Pull Request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests)" is a confusing term, but it means exactly what it says: You're requesting that the maintainers of the repository pull your changes in. If you don't have a CLA on file, we'll reach out to you. Your contribution will be reviewed, and we may ask you to revise your pull request based on our feedback. Once everyone is satisfied, we'll merge your pull request into the repository.
17+
18+
## Guidelines
19+
20+
We don't have best practices for writing MATLAB&reg; code, but we do have some recommendations:
21+
22+
* You should not have any warnings or errors in the [code analyzer report](http://www.mathworks.com/help/matlab/matlab_prog/matlab-code-analyzer-report.html)
23+
* [Loren Shure's blog](https://blogs.mathworks.com/loren) has [great advice on improving your MATLAB code](https://blogs.mathworks.com/loren/category/best-practice/)
24+
* Examples should be written as [live scripts](https://www.mathworks.com/help/matlab/matlab_prog/what-is-a-live-script-or-function.html) or [Simulink&reg; models](https://www.mathworks.com/help/simulink/index.html).
25+
* We adhere to the [CommonMark](https://commonmark.org/) specification where it does not conflict with GitHub rendering. If you edit your Markdown in Visual Studio Code or a similar editor, it uses [markdownlint](https://github.com/DavidAnson/markdownlint) to highlight issues in your Markdown.
26+
27+
**Again, thanks for contributing, and we look forward to your issues and pull requests!**

Data/BungeeParams.mat

493 Bytes
Binary file not shown.

Data/BungeeParamsDrag.mat

11.9 KB
Binary file not shown.

Data/MSDParams.mat

12.7 KB
Binary file not shown.

EngineeringProblemSolving.prj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<MATLABProject xmlns="http://www.mathworks.com/MATLABProjectFile" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0"/>

Images/AddOnsIcon.png

1.1 KB
Loading

0 commit comments

Comments
 (0)