1
votes

So I have imported RGB photo into my Matlab workspace. It says it has value: <200x200x3 uint8>. Meaning it has class uint8. And its name is: prettyPic. So when I try to do the following:

% Convert prettyPic to vector format using function imstack2vectors.

[prettyPic, L] = imstack2vectors(prettyPic); 

I get the following error:

??? Undefined function or method 'imstack2vectors' for input arguments of type 'uint8'.

I was searching google all around reading the Matlab help and even trying to give 'imstack2vectors' different types of variables only to find that none works.

So the question is what type of picture should I feed the 'imstack2vectors' with. And how can I convert the picture that I have to that format/class.

I am a begginer in Matlab so any help would be greatly appreciated!

1

1 Answers

2
votes

??? Undefined function or method 'imstack2vectors' for input arguments of type 'uint8'.

Means that most likely, the function imstack2vectors does not exist on your Matlab path (i.e Matlab cannot find a function of this name).

Type which imstack2vectors to see whether Matlab can find it on the path. If it returns nothing, but you know where the function is on your hard drive, you can change directories in Matlab to where the function is located, and then run your command again.

In general, you may want to learn about adding functions to the Matlab path.