matlab - Undefined function 'eq' for input arguments of type 'cell' -
i tried make function generates number of strings.
function [p] = getpattern (v) load('code128b.mat') a=1:length(code128b) if v == code128b(a,1) p=code128b{a,3}; end end
code128b.mat contains data, first column numbers while third column strings. want input numbers , produce string. why function produce error: undefined function 'eq' input arguments of type 'cell'.? don't it.
thanks help.
for cell arrays, curly braces ({}
) used extract contents of cells, while parentheses (()
) used extract subset of cells (that is, result cell array).
use code128b{a,1}
instead of code128b(a,1)
number instead of cell containing number. however, if v
cell have use isequal
compare contents.
Comments
Post a Comment