Skip to content

Commit 136ef3a

Browse files
committed
Initial commit
0 parents  commit 136ef3a

File tree

525 files changed

+3993
-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.

525 files changed

+3993
-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: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
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: # Simulink Statistics_and_Machine_Learning_Toolbox
42+
# List required products above in the format shown (and uncomment them)
43+
# List of product strings:
44+
# Simulink
45+
# Statistics_and_Machine_Learning_Toolbox
46+
# Simulink_Coder
47+
# Econometrics_Toolbox
48+
# Deep_Learning_Toolbox
49+
50+
51+
# Run all the tests
52+
- name: Run SmokeTests
53+
uses: matlab-actions/run-command@v2
54+
with:
55+
command: openProject(pwd); RunAllTests;
56+
57+
# Upload the test results as artifact
58+
- name: Upload TestResults
59+
if: ${{ always() }}
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: TestResults_${{ matrix.MATLABVersion }}
63+
path: ./public/*
64+
overwrite: true
65+
66+
badge:
67+
if: ${{ always() }}
68+
needs: [test]
69+
strategy:
70+
fail-fast: false
71+
runs-on: ubuntu-latest
72+
steps:
73+
74+
# Checks-out your repository
75+
- uses: actions/checkout@v4
76+
77+
# Sets up R2023b
78+
- name: Setup MATLAB
79+
uses: matlab-actions/setup-matlab@v2
80+
with:
81+
release: R2024b
82+
83+
# Download the test results from artifact
84+
- name: Download All TestResults
85+
uses: actions/download-artifact@v4
86+
with:
87+
path: public
88+
pattern: TestResults_*
89+
merge-multiple: true
90+
91+
# Create the test results badge
92+
- name: Run PostSmokeTest
93+
uses: matlab-actions/run-command@v2
94+
with:
95+
command: openProject(pwd); PostSmokeTest;
96+
97+
# Deploy reports to GitHub pages
98+
- name: Setup Pages
99+
uses: actions/configure-pages@v5
100+
- name: Upload pages artifact
101+
uses: actions/upload-pages-artifact@v3
102+
with:
103+
path: public
104+
- name: Deploy to GitHub Pages
105+
id: deployment
106+
uses: actions/deploy-pages@v4
107+
108+
# Commit the JSON for the MATLAB releases badge
109+
- name: Commit changed files
110+
continue-on-error: true
111+
run: |
112+
git config user.name "${{ github.workflow }} by ${{ github.actor }}"
113+
git config user.email "<>"
114+
git pull
115+
git add Images/TestedWith.json
116+
git commit Images/TestedWith.json -m "Update CI badges ${{ github.ref_name }}"
117+
git fetch
118+
git push

.gitignore

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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+
# GitLab page folder
51+
public/

.gitlab-ci.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
stages:
2+
# Set up two testing paths
3+
- test
4+
- deploy
5+
- release
6+
7+
# Published matlab-batch image, link provided by Jos M.
8+
# MATLAB_BATCH_TOKEN is established as a GitLab CI/CD variable
9+
.matlab_batch_defaults:
10+
image:
11+
name: 677276097160.dkr.ecr.us-east-1.amazonaws.com/external-git/matlab-gitrunner-image:R2024b-latest
12+
entrypoint: [""]
13+
14+
smoke-test:
15+
# Smoke tests should run all the time
16+
extends: .matlab_batch_defaults
17+
tags:
18+
# Add additional tags like (e.g. - arduino) as required
19+
# Make sure that the runner you plan to use matches the tags
20+
- mathworks.matlab.cloud-linux-kubernetes
21+
stage: test
22+
script:
23+
- export MLM_LICENSE_TOKEN="$LICENSEOWNER|$LICENSELABEL|$LICENSETOKEN" # Set the batch token license
24+
- xvfb-run matlab-batch "openProject(pwd);RunAllTests"
25+
when: always
26+
allow_failure: true
27+
artifacts:
28+
name: "$VERSION"
29+
paths:
30+
- public/*
31+
when: always
32+
33+
34+
pages:
35+
extends: .matlab_batch_defaults
36+
tags:
37+
- mathworks.matlab.cloud-linux-kubernetes
38+
stage: deploy
39+
script:
40+
- export MLM_LICENSE_TOKEN="$LICENSEOWNER|$LICENSELABEL|$LICENSETOKEN" # Set the batch token license
41+
- xvfb-run matlab-batch "openProject(pwd);PostSmokeTest;"
42+
artifacts:
43+
paths:
44+
- public
45+
46+
file-test:
47+
extends: .matlab_batch_defaults
48+
tags:
49+
- mathworks.matlab.cloud-linux-kubernetes
50+
stage: release
51+
script:
52+
- export MLM_LICENSE_TOKEN="$LICENSEOWNER|$LICENSELABEL|$LICENSETOKEN" # Set the batch token license
53+
- xvfb-run matlab-batch "proj = openProject(pwd);
54+
addpath(proj.RootFolder+'/InternalFiles/Tests/CI');
55+
results = runtests('OpenCloseFileTest.m');
56+
disp(table(results)); assertSuccess(results);"
57+
rules:
58+
# This test should always run when merging to main
59+
# And be available for manual running on any push
60+
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
61+
when: always
62+
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
63+
when: manual
64+
allow_failure: true
65+
66+
# release-testing:
67+
# tags:
68+
# - matlab
69+
# stage: release
70+
# script:
71+
# - matlab -batch "proj = openProject(pwd);
72+
# cd ..;
73+
# addpath(genpath(fullfile('utilities','TestingResources')));
74+
# addpath(genpath(fullfile('utilities','Tools')));
75+
# runCMTests"
76+
# rules:
77+
## This test should always run when merging to main
78+
## And be available for manual running on any push
79+
# - if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
80+
# when: always
81+
# - if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
82+
# when: manual
83+
# allow_failure: true

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:onlineteaching@mathworks.com)
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!**

FunctionLibrary/.gitkeep

Whitespace-only changes.

Images/AddOnsIcon.png

1.1 KB
Loading

Images/AppliedPDEsCard.png

22.3 KB
Loading

Images/EndIcon.png

955 Bytes
Loading

Images/EngSphCoord.png

22.2 KB
Loading

0 commit comments

Comments
 (0)