MATLAB: Loop problem

loop

Hello, I have a loop problem in Matlab
Consider the following datasets:
models = 5×10 (5 rows, 10 columns)
bsdata = 5×20 (5 rows, 20 columns)
I want to do the following calculation:
Result=models(bsdata);
If I do so, I obtain a 5×20 dataset. How can I do this for all the 10 columns of models? I would like to obtain a 10×200 dataset? I have tried the following, but it doesn’t work:
for i=1:10
Result=models(:,i)(bsdata);
end
Thanks,
Pieter

Best Answer

Then:
Result = models(bsdata,:);
You will draw rows direclty fro models.