Borrar filtros
Borrar filtros

Error with ismember in a loop for

1 visualización (últimos 30 días)
fede
fede el 11 de Abr. de 2016
Comentada: Walter Roberson el 11 de Abr. de 2016
Hi, I have the following code with the error: "Input A of class cell and input B of class cell must be cell arrays of strings, unless one is a string".
for ii=1:size(couple,1);
looking_up=couple(ii,:);
[tf, coldix]=ismember(looking_up,ff(ii,:));
prices=ff(:,coldix(tf));
prices=prices(2:end,:);
prices=cell2mat(prices);
x(ii)=prices(:,2);
y(ii)=prices(:,1);
end
where prices is a nxn matrix
stock_1 stock_2 ..... stock_n
45.5.....88.9......555.9
and so on
couple is a nx2 matrix:
stock_1 stock_2
stock_5 stock_8
and so on

Respuestas (0)

Categorías

Más información sobre Multidimensional Arrays en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by