Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
COMSOL programming
Posted 18.11.2020, 00:16 GMT-5 General, API, Simulation Apps 2 Replies
Please login with a confirmed email address before reporting spam
Hello, I want to generate random interpolation curve coordinate (xyz) using comsol program and my code follows
model.component(“comp1”).geom(“geom1”).create(“ic1”, “InterpolationCurve”); with(model.component(“comp1”).geom(“geom1”).feature(“ic1”)); int N = 100; double KK[][] = new double[N][3]; for (int k = 1; k < 100; k++) { KK[k][0] = Math.random(); KK[k][1] = Math.random); KK[k][2] = Math.random(); set("table", new double[][]{{KK[k][0], KK[k][1], KK[k][2]}}); } endwith();
table reads only (100th) last coordinate but I want all coordinates(100) in table. please help me.
Thanks Kiran