Plot a function of two variables?
显示 更早的评论
I implemented a function of two variables in Matlab :
function X=mFunction(alpha,beta).
I want to see his graph for the alpha and beta values between 0 and 1. How should I proceed?
Thanks
回答(1 个)
dpb
2016-7-3
See example at
doc meshgrid
4 个评论
amine&&
2016-7-4
dpb
2016-7-4
Your function isn't written correctly, then. Use the debugger to see what's the mismatch in dimensions; it's not totally apparent as one would presume i is a loop index and so is a single integer value; if MS3 is an array it would also be a single value but if it happened to be a function it could return something other than. Or alpha could be the culprit...
Whatever it is, it looks like the LHS is a single value whereas the RHS isn't. But, not enough context for us to tell for certain who's to blame but looks like alpha is the likely suspect.
Walter Roberson
2016-7-4
You went ahead and created a new Question on this topic, and I gave the answer there.
amine&&
2016-7-4
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!