Solving implicit equation for three variables

3 ビュー (過去 30 日間)
Hirak
Hirak 2018 年 11 月 8 日
回答済み: Hirak 2018 年 11 月 24 日
I want to solve the supersphere equation x^n+y^n=1 for x_range=y_range=.1:.1:1 and n=.3:.3:3.
I have done the plot with fimplicit command, but that was improper for me since I cannot find the x and y values for the stacked sequence.
Please help.
h=20; %no of points
x_max=1;
x_min=0.1;
y_max=1;
y_min=0.1;
n_max=3;
n_min=0.1;
dx=(x_max-x_min)/h;
dy=(y_max-y_min)/h;
dn=(n_max-n_min)/h;
[i,j,k] = meshgrid(1:h+1,1:h+1,1:h+1);
x= x_min + (i-1).* dx;
n= n_min + (j-1).* dn;
y= y_min + (k-1).* dy;
numElementsN = length(n);
numElementsX = length(x);
numElementsY = length(y);
U = zeros(numElementsX,numElementsN,numElementsY);
for r=1:numElementsN
for s=1:numElementsX
for p=1:numElementsY
z=fzero(findt,0.1:.1: 1, 0.1:.1: 1, 0.3 :.1: 3);
end
end
end
where, the function findt is referred to
function F=findt(x,y,n)
F = x.^n+y.^n-1;

採用された回答

Hirak
Hirak 2018 年 11 月 24 日
I have found the individual matrices, but now I want to group the matrices taking one cloumn from each, viz.,
for n=.5:.5:5
hold on
f=(@(x,y) (x.^n)+(y.^n)-1);
g=fimplicit(f,[0 1 0 1]);
hold off
hgsave(gca,'f2.fig')
end
line = get(gca, 'Children'); % Get the line object in the current axis of the figure.
p = get(line, 'XData'); % Get the abscissas.
q = get(line, 'YData'); % Get the ordinates.
P=cell2mat(p);
X=P';
Q=cell2mat(q);
Y=Q';
I want to group (X1,Y1), (X2, Y2), (X3,Y3) ..... separately for each column.
How can I do it?

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFractals についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by