ndgrid-单元格数组的输入和输出

时间:2019-04-19 07:01:47

标签: scilab

我正在将一些代码从Matlab转换为Scilab,在尝试将Scilab'ndgrid'函数与单元格数组的输入和输出一起使用时遇到麻烦。 具体来说,我将ndgrid与先验未知数量的向量(包含在单元格数组中)一起使用,并打算获取单元格数组中的输出网格矩阵。

在Matlab中,代码如下所示:

    v = {0:3,0:3}; // not necessarily of length 2 (dynamically set)
    G = cell(1,2);
    [G{:}] = ndgrid(v{:});

我无法使用Scilab获得类似的行为(无论是输入还是输出)。 对于输入,Scilab返回ndgrid: Wrong type for argument #1: Booleans, Integers, Decimals, Complexes, Polynomials, Rationals or Texts expected.

我希望有解决方法。感谢您的帮助!

0 个答案:

没有答案
相关问题