Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.2 - English

Change language to:
Français - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab Help >> Java from Scilab > jwrap

jwrap

Wrap a Scilab variable into a Java one if possible

Calling Sequence

[jw_1, jw_2, ...] = jwrap(sc_1 [, sc_2 [, sc_3 [,... ]]])

Parameters

sc_i

A Scilab variable

jw_i

A Java wrapping of the corresponding Scilab variable

Description

Wrap a Scilab variable into a Java one. For now, only the primitive type can be wrapped:

  • constant (real not complex) into double;
  • string into String;
  • boolean into boolean;
  • int8 into byte;
  • uint8 into short;
  • int16 into short;
  • uint16 into int;
  • int32 into int;
  • uint32 into long.
The matrices are wrapped into arrays too, e.g. an int8 matrix 3x4 is wraped into a byte[3][4] or byte[4][3] depending on conversion method which can be changed in using the command jconvMatrixMethod. You should take care that the range of the index is the same as in Java, so a(0) is valid.

It is possible to wrap into Java types float or char in using respectively jwrapinfloat and jwrapinchar.

Examples

[a,b,c] = jwrap(1, [1 2;3 4], ["hello" "world"]);
a, b(1, 1), c(1)

See Also

  • jconvMatrixMethod — Set the way to convert matrices This function is obsolete.
  • jwrapinfloat — Wrap Scilab double matrix into Java float multiarray.
  • jwrapinchar — Wrap Scilab uint16 matrix into Java char multiarray.
  • junwrap — Convert a Java object into a Scilab native type

History

VersionDescription
5.5.0 Function introduced. Based on the 'JIMS' module. The main difference in the behavior compared to the JIMS module is that jautoUnwrap is enabled by default.
Report an issue
<< jvoid Java from Scilab jwrapinchar >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Apr 01 10:14:08 CEST 2015