Skip to content

Commit 0126f06

Browse files
committed
Added new DC circuit files for templates
1 parent 6e636cf commit 0126f06

73 files changed

Lines changed: 841 additions & 0 deletions

Some content is hidden

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

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

.gitignore

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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

.gitlab-ci.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
stages:
2+
# Set up two testing paths
3+
- setup
4+
- test
5+
- release
6+
7+
setup-job:
8+
tags:
9+
- matlab
10+
stage: setup
11+
script:
12+
- cd ..
13+
- if (test-path utilities) { rm -r -force utilities }
14+
- git clone git@insidelabs-git.mathworks.com:modular-curriculum-content/utilities.git
15+
- cd $CI_PROJECT_NAME
16+
allow_failure: false
17+
18+
19+
smoke-test:
20+
# Smoke tests should run all the time
21+
tags:
22+
# Add additional tags like (e.g. - arduino) as required
23+
# Make sure that the runner you plan to use matches the tags
24+
- matlab
25+
stage: test
26+
script:
27+
- matlab -batch "openProject(pwd);
28+
results = runtests(fullfile('SoftwareTests','SmokeTests.m'));
29+
disp(table(results)); assertSuccess(results);"
30+
when: always
31+
allow_failure: true
32+
33+
smoke-test-solution:
34+
tags:
35+
- matlab
36+
stage: release
37+
script:
38+
- matlab -batch "proj = openProject(pwd);
39+
addpath(genpath(proj.RootFolder));
40+
results = runtests(fullfile('InternalFiles','Tests','CI','SolnSmokeTests.m'));
41+
disp(table(results)); assertSuccess(results);"
42+
rules:
43+
# This test should always run when merging to main
44+
# And be available for manual running on any push
45+
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
46+
when: always
47+
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
48+
when: manual
49+
allow_failure: true
50+
51+
file-test:
52+
tags:
53+
- matlab
54+
stage: release
55+
script:
56+
- matlab -batch "proj = openProject(pwd);
57+
addpath(proj.RootFolder+'/InternalFiles/Tests/CI');
58+
results = runtests('OpenCloseFileTest.m');
59+
disp(table(results)); assertSuccess(results);"
60+
rules:
61+
# This test should always run when merging to main
62+
# And be available for manual running on any push
63+
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
64+
when: always
65+
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
66+
when: manual
67+
allow_failure: true
68+
69+
release-testing:
70+
tags:
71+
- matlab
72+
stage: release
73+
script:
74+
- matlab -batch "proj = openProject(pwd);
75+
cd ..;
76+
addpath(genpath(fullfile('utilities','TestingResources')));
77+
runCMTests"
78+
rules:
79+
# This test should always run when merging to main
80+
# And be available for manual running on any push
81+
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
82+
when: always
83+
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
84+
when: manual
85+
allow_failure: true

CONTRIBUTING.md

Lines changed: 27 additions & 0 deletions

DCCircuitAnalysis.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/EquivalentCircuitDemo.png

76.2 KB

Images/MeshAnalysisCircuit.png

60.7 KB

Images/MeshAnalysisExample.png

55.1 KB

Images/NodalAnalysisCircuit.png

56.3 KB

Images/NodalAnalysisExample.png

51.5 KB

0 commit comments

Comments
 (0)