Skip to content

Commit 7a6245d

Browse files
committed
Improved the README's links to the demo and instructions for running a demo script.
1 parent 5e0d3e1 commit 7a6245d

3 files changed

Lines changed: 30 additions & 2 deletions

File tree

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- [Fixed bug in ArrayUtils.equals when applied to arrays of long.](https://github.com/diffplug/matconsolectl/commit/088b954551392dc7b24142fd7f1cbcdc6a4005bf)
1010
- [Fixed a serialization bug.](https://github.com/diffplug/matconsolectl/commit/d6bc07adca74f0bb3ae91c1009222eff6b975774)
1111
- Broke up the test suite into `test`, `testMatlabHeadless`, and `testMatlabInteractive`
12+
- Moved the demo code into the main library. It's a very small demo with no dependencies, makes life easier to manage one jar rather than two.
1213

1314
### Version 4.3.0 - February 23rd 2015
1415

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ If you're getting style warnings, `gradlew spotlessApply` will apply anything ne
2424
In order to keep CI happy, there are three kinds of tests:
2525

2626
* `gradlew test` doesn't need MATLAB, automatically called by `gradlew build`
27-
* `gradlew testMatlabHeadless` needs MATLAB but not a human, see [GetAndSetTest.java](matlabcontrol/test/matlabcontrol/GetAndSetTest.java?ts=4)
28-
* `gradlew testMatlabInteractive` needs MATLAB and a human, see [CopyPasteTest.java](matlabcontrol/test/matlabcontrol/CopyPasteTest.java?ts=4)
27+
* `gradlew testMatlabHeadless` needs MATLAB but not a human, see [GetAndSetTest.java](test/matlabcontrol/GetAndSetTest.java?ts=4)
28+
* `gradlew testMatlabInteractive` needs MATLAB and a human, see [CopyPasteTest.java](test/matlabcontrol/CopyPasteTest.java?ts=4)
2929
* `gradlew testMatlabAll` runs all of the above
3030

3131
## License

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ MatConsoleCtl is a Java API that allows calling MATLAB from Java. You can `eval`
2424

2525
<!---freshmark javadoc
2626
output = prefixDelimiterReplace(input, 'https://{{org}}.github.io/{{name}}/javadoc/', '/', stable);
27+
output = prefixDelimiterReplace(output, "version = '", "';", stable);
28+
output = prefixDelimiterReplace(output, 'java -jar matconsolectl-', '.jar', stable);
2729
-->
2830

2931
```java
@@ -45,8 +47,33 @@ assert(actual == 5.0)
4547
proxy.disconnect();
4648
```
4749

50+
Javadoc links for [MatlabProxyFactoryOptions.Builder](http://diffplug.github.io/matconsolectl/javadoc/snapshot/matlabcontrol/MatlabProxyFactoryOptions.Builder.html) and [MatlabProxy](http://diffplug.github.io/matconsolectl/javadoc/snapshot/matlabcontrol/MatlabProxy.html).
51+
4852
Contributions are welcome, see the [contributing guide](CONTRIBUTING.md) for development info.
4953

54+
## Demo
55+
56+
MatConsoleCtl includes a demo GUI. Below is a script you can use to run the demo inside of MATLAB:
57+
58+
```matlab
59+
version = '4.3.0';
60+
tempdir = 'matconsolectl_demo';
61+
62+
% make a directory to copy the jar into
63+
mkdir tempdir;
64+
% download the jar
65+
URL = ['https://repo1.maven.org/maven2/com/diffplug/matsim/matlabcontrol/' version '/matlabcontrol-' version '.jar'];
66+
filename = [tempdir '/matconsolectl-' version '.jar'];
67+
urlwrite(URL,filename);
68+
% add it to the path
69+
javaaddpath([pwd '\' tempdir]);
70+
71+
% run it
72+
matlabcontrol.demo.DemoMain
73+
```
74+
75+
You can also run the demo outside of MATLAB by downloading the jar, then running `java -jar matconsolectl-4.3.0.jar` at a console.
76+
5077
## Compatibility
5178

5279
MatConsoleCtl works on Win/Mac/Linux, MATLAB R2007b through R2015b, and it will continue to work so long as MATLAB maintains the Java MATLAB Interface.\*

0 commit comments

Comments
 (0)