MATLAB Answers

0

Passing the input argument to the class

Latest activity Answered by Adam
on 27 Jul 2016
I need to know how can i pass the input argruments received from other function to the class
for example i got a function
function[a,b,c] = getdata(datalength, stringlength)
so now i need to pass the input arguments to the class created. How can i do it??

  0 Comments

Sign in to comment.

1 Answer

Answer by Adam
on 27 Jul 2016
 Accepted Answer

If your class constructor takes arguments then just
[a, b, c] = getdata( datalength, stringlength );
myObj = myClass( a, b, c );
or if you already have an object then you need some function that accepts the 3 arguments. It is hard to say if you post nothing about your class and when/how/where it is constructed.

  0 Comments

Sign in to comment.