How to use cgs with your own matrix-vector multiplication?
1 次查看(过去 30 天)
显示 更早的评论
From doc cgs I see, you can call the cgs function like:
x=cgs(@afun, b);
function afun is your self defined matrix vector multiplication function. But how pass parameters to afun? If function afun is defined as
function y=afun(a, b, c, d)
As you can see, afun uses 4 parameters. How to pass them to afun? Can one just use the following
x=cgs(@afun(a,b,c,d), b)
Thanks!
0 个评论
采纳的回答
James Tursa
2015-11-16
编辑:James Tursa
2015-11-16
If a,c,d are pre-existing constant terms, you could use an anonymous function. E.g.,
afun2 = @(b)(afun(a,b,c,d))
then
x = cgs(afun2, b)
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Trigonometry 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!