how to create matrix using vectors

3 次查看(过去 30 天)
Hi All, my problems is how to create matrix Aij{n by n} using vector Bi{1 by n} and Cj{1 by n}, where Aij=f(Bi, Cj). I dont like to use the double for loop. is there any fast way to do that?
Thanks

采纳的回答

Andrei Bobrov
Andrei Bobrov 2012-2-18
A = bsxfun(f,B.',C) % f = @(x,y)....

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by