Info
此问题已关闭。 请重新打开它进行编辑或回答。
Im trying to create a surface plot of the matrix z1 once it has been calculated:
1 次查看(过去 30 天)
显示 更早的评论
I have the following code:
syms x y
F = (4*fvalue./((pi^4).*D3.*a.*b));
F1 =@(x,y,N,m1) (((sin(m1.*pi.*xvalue/a)).*(sin(m1.*pi.*yvalue/a)))./(((m1/a).^2)+((N1/b).^2))).*((sin(m1.*pi.*x./a)).*(sin(m1.*pi.*y./a)));
F2 = F1(x,y,N1,m1);
F3 = sum(F2);
F4 = symfun(F3, [x,y]);
F5= (F.*F4);
F6 = symfun(F5,[x,y]);
[X1,Y1] = meshgrid (0:1:int16(a*1000), 0:1:int16(b*1000));
z1x=(b/1e-3)+1;
z1y=(a/1e-3)+1;
z2x=round(z1x);
z2y=round(z1y);
z1 = zeros(z2x,z2y);
z1xy=z1x*z1y;
for p=(1:(b*1000)); for n = (1:z1xy); H=F6((1),(p)); z1=H(X1(n),Y1(n)); end end
F6 creates a matrix of equations [equation 1, equation2, ...equationN] in terms of x and y. I need to create a for loop which selects equation 1 (element 1) from F6 and calculates for X and Y when n=1 and repeats with equation 2 (element 2) when n=2. This should create a matrix. Basically i want to use Element 1 to calculate for column 1 of matrix z1, Element 2 to calculate for column 2 of matric Z1.
0 个评论
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!