Mercurial > hg > human-echolocation-java-webapp
changeset 5:ac4aa1922f32
Calling the simulateBinauralSignals function using a structure (new interface).
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Wed, 27 Nov 2013 17:41:10 +0000 |
parents | f6cffd6abce3 |
children | 83e0c27b4dbc |
files | webapp/WEB-INF/src/TestEchoClass.java |
diffstat | 1 files changed, 6 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/webapp/WEB-INF/src/TestEchoClass.java Wed Nov 27 17:24:31 2013 +0000 +++ b/webapp/WEB-INF/src/TestEchoClass.java Wed Nov 27 17:41:10 2013 +0000 @@ -17,20 +17,19 @@ HumanEcho echo; - try { echo = new HumanEcho(); - // Matlab function: - // a = struct('dist', 0.9, 'azim', 0, 'orient', 'horz', 'dirweight', 0.2) - // package input into MW Structure Array + // Matlab structure: + // Input = struct('dist', 0.9, 'azim', 0, 'orient', 'horz', 'dirweight', 0.2) + String[] InputStructFields = {"dist", "azim", "orient", "dirweight"}; Input = new MWStructArray(1, 1, InputStructFields); - Input.set("dist", 1, 0.9); - Input.set("azim", 1, "azim"); + Input.set("dist", 1, Double.valueOf(0.9)); + Input.set("azim", 1, Double.valueOf(0)); Input.set("orient", 1, "horz"); - Input.set("dirweight", 1, 0.2); + Input.set("dirweight", 1, Double.valueOf(0.2)); Object[] result = echo.simulateBinauralSignals(Input);