Incorrect number or types of inputs or outputs for custom function.
Hello, i’m currently trying to implement a custom class (intL) that handles large integers operations by using vectors.
In this class one function is make_intL, which is supposed to take as an input a regular integer array and outputs an array of intL objects of the same size.
Everytime i call this function, i get "Incorrect number or types of inputs or outputs for function make_intL", which i’ve never seen before.
The function:
function intL_array = make_intL(array)
[rows,cols] = size(array);
intL_array = intL.empty(0,0);
intL_array(rows,cols) = intL();
for i = 1:rows
for j = 1:cols
intL_array(i,j) = intL(array(i,j));
end
end
end
The error message doesn’t specify a line so i don’t really know where to look to try and debug, and looking at the already asked topics didn’t help either.
Calls i’ve tried:
intL_array = make_intL([10, 20, 30, 40, 50])
intL_array = make_intL([123;456])
intL_array = make_intL([1 2 3 ; 4 5 6])Hello, i’m currently trying to implement a custom class (intL) that handles large integers operations by using vectors.
In this class one function is make_intL, which is supposed to take as an input a regular integer array and outputs an array of intL objects of the same size.
Everytime i call this function, i get "Incorrect number or types of inputs or outputs for function make_intL", which i’ve never seen before.
The function:
function intL_array = make_intL(array)
[rows,cols] = size(array);
intL_array = intL.empty(0,0);
intL_array(rows,cols) = intL();
for i = 1:rows
for j = 1:cols
intL_array(i,j) = intL(array(i,j));
end
end
end
The error message doesn’t specify a line so i don’t really know where to look to try and debug, and looking at the already asked topics didn’t help either.
Calls i’ve tried:
intL_array = make_intL([10, 20, 30, 40, 50])
intL_array = make_intL([123;456])
intL_array = make_intL([1 2 3 ; 4 5 6]) Hello, i’m currently trying to implement a custom class (intL) that handles large integers operations by using vectors.
In this class one function is make_intL, which is supposed to take as an input a regular integer array and outputs an array of intL objects of the same size.
Everytime i call this function, i get "Incorrect number or types of inputs or outputs for function make_intL", which i’ve never seen before.
The function:
function intL_array = make_intL(array)
[rows,cols] = size(array);
intL_array = intL.empty(0,0);
intL_array(rows,cols) = intL();
for i = 1:rows
for j = 1:cols
intL_array(i,j) = intL(array(i,j));
end
end
end
The error message doesn’t specify a line so i don’t really know where to look to try and debug, and looking at the already asked topics didn’t help either.
Calls i’ve tried:
intL_array = make_intL([10, 20, 30, 40, 50])
intL_array = make_intL([123;456])
intL_array = make_intL([1 2 3 ; 4 5 6]) matlab MATLAB Answers — New Questions