Skip to content

Commit 6baa121

Browse files
committed
2 parents e513275 + 4c41972 commit 6baa121

1 file changed

Lines changed: 110 additions & 0 deletions

File tree

README.md

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,113 @@ MathWorks provides a free basic version of [MATLAB Online](https://uk.mathworks.
2121
## Installation
2222

2323
openMINDS for MATLAB can be installed from MATLAB's addon manager (recommended). It is also possible to download the MATLAB toolbox from FileExchange or from the Releases page of this repository and install it manually.
24+
25+
## Getting Started
26+
27+
28+
### Configure MATLAB's path to use the latest model versions
29+
30+
Note: Make sure **MATLAB_openMINDS** has been added to MATLAB's [search path](https://se.mathworks.com/help/matlab/matlab_env/what-is-the-matlab-search-path.html). If you installed **MATLAB_openMINDS** using the AddonManager, this should already have been taken care of.
31+
32+
```matlab
33+
selectOpenMindsVersion("latest")
34+
```
35+
### Import schemas from core model
36+
```matlab
37+
import openminds.core.*
38+
```
39+
### Create a Subject
40+
```matlab
41+
% Create a new demo subject
42+
subject1 = Subject('species', 'musMusculus', 'biologicalSex', 'male', 'lookupLabel', 'demo_subject1');
43+
disp(subject1)
44+
```
45+
46+
```TextOutput
47+
Subject (https://openminds.ebrains.eu/core/Subject) with properties:
48+
biologicalSex: male (BiologicalSex)
49+
internalIdentifier: ""
50+
isPartOf: [None] (SubjectGroup)
51+
lookupLabel: "demo_subject1"
52+
species: Mus musculus (One of: Species, Strain)
53+
studiedState: [None] (SubjectState)
54+
Required Properties: species, studiedState
55+
```
56+
### Create a Subject State
57+
```matlab
58+
subjectState = openminds.core.SubjectState('lookupLabel', 'demo_state')
59+
```
60+
61+
```TextOutput
62+
subjectState =
63+
SubjectState (https://openminds.ebrains.eu/core/SubjectState) with properties:
64+
additionalRemarks: ""
65+
age: [None] (One of: QuantitativeValue, QuantitativeValueRange)
66+
ageCategory: [None] (AgeCategory)
67+
attribute: [None] (SubjectAttribute)
68+
descendedFrom: [None] (SubjectState)
69+
handedness: [None] (Handedness)
70+
internalIdentifier: ""
71+
lookupLabel: "demo_state"
72+
pathology: [None] (Any of: Disease, DiseaseModel)
73+
relativeTimeIndication: [None] (One of: QuantitativeValue, QuantitativeValueRange)
74+
weight: [None] (One of: QuantitativeValue, QuantitativeValueRange)
75+
Required Properties: ageCategory
76+
```
77+
78+
```matlab
79+
% Add subject state to subject
80+
subject1.studiedState = subjectState;
81+
disp(subject1)
82+
```
83+
84+
```TextOutput
85+
Subject (https://openminds.ebrains.eu/core/Subject) with properties:
86+
biologicalSex: male (BiologicalSex)
87+
internalIdentifier: ""
88+
isPartOf: [None] (SubjectGroup)
89+
lookupLabel: "demo_subject1"
90+
species: Mus musculus (One of: Species, Strain)
91+
studiedState: demo_state (SubjectState)
92+
Required Properties: species, studiedState
93+
```
94+
95+
```matlab
96+
subjectState.lookupLabel = "demo_subjectstate_pre_recording";
97+
98+
subjectStatePost = openminds.core.SubjectState('lookupLabel', 'demo_subjectstate_post_recording')
99+
```
100+
101+
```TextOutput
102+
subjectStatePost =
103+
SubjectState (https://openminds.ebrains.eu/core/SubjectState) with properties:
104+
additionalRemarks: ""
105+
age: [None] (One of: QuantitativeValue, QuantitativeValueRange)
106+
ageCategory: [None] (AgeCategory)
107+
attribute: [None] (SubjectAttribute)
108+
descendedFrom: [None] (SubjectState)
109+
handedness: [None] (Handedness)
110+
internalIdentifier: ""
111+
lookupLabel: "demo_subjectstate_post_recording"
112+
pathology: [None] (Any of: Disease, DiseaseModel)
113+
relativeTimeIndication: [None] (One of: QuantitativeValue, QuantitativeValueRange)
114+
weight: [None] (One of: QuantitativeValue, QuantitativeValueRange)
115+
Required Properties: ageCategory
116+
```
117+
118+
```matlab
119+
subject1.studiedState(end+1) = subjectStatePost;
120+
disp(subject1)
121+
```
122+
123+
```TextOutput
124+
Subject (https://openminds.ebrains.eu/core/Subject) with properties:
125+
biologicalSex: male (BiologicalSex)
126+
internalIdentifier: ""
127+
isPartOf: [None] (SubjectGroup)
128+
lookupLabel: "demo_subject1"
129+
species: Mus musculus (One of: Species, Strain)
130+
studiedState: [demo_subjectstate_pre_recording demo_subjectstate_post_recording] (SubjectState)
131+
Required Properties: species, studiedState
132+
```
133+

0 commit comments

Comments
 (0)