how to compute a for cycle in copulapdf varying nu parameter from 1 to 8
2 次查看(过去 30 天)
显示 更早的评论
I have to use copulapdf command and create different figures from it, varying the parameter nu from 1 to 8. The code for the copula pdf for the nu value=1 is:
nu=1;
r=0.5;
u = linspace(0,1,20);
[u1,u2] = meshgrid(u,u);
rho1 = copulaparam('t',r,nu);
y = copulapdf('t',[u1(:),u2(:)],rho1,nu);
surf(u1,u2,reshape(y,20,20))
xlabel('u1')ylabel('u2')
This script works but i want to find a way to have figures automatically for different values of nu. Can someone help me to write the for cycle for this purpose?
0 个评论
采纳的回答
Jeff Miller
2018-8-29
Not sure if this is what you want, but it looks easy enough. Change the first line to
for nu=1:8
add
end
as the last line. And insert
figure;
before the surf command.
5 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!