How do I create a matrix with functions?
信息
此问题已关闭。 请重新打开它进行编辑或回答。
显示 更早的评论
I have a function with two variables, I want to generate a matrix of function outputs with one range of each output. How do I do that?
0 个评论
回答(1 个)
Guillaume
2015-12-3
var1 = 1:10; %row vector for one input
var2 = (1:5)'; %column vector for the other
m = bsxfun(@yourfun, var1, var2)
0 个评论
此问题已关闭。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!