Blending interpolation for a function

8 ビュー (過去 30 日間)
MAN MARIUS
MAN MARIUS 2020 年 6 月 2 日
コメント済み: MAN MARIUS 2020 年 6 月 3 日
I need to calculate the value f(x,y)=sin((pi/2)*(x+y)) for the function using the blending interpolation reffering to x0=-1, x1=1, y0=-1, y1=1 in point (1/3,1/3).
Can somebody help me with the code for this? I need to make even a graphics interface but there i can try to do it.....
  2 件のコメント
Ameer Hamza
Ameer Hamza 2020 年 6 月 2 日
What is the equation for blending interpolation?
MAN MARIUS
MAN MARIUS 2020 年 6 月 2 日
uh,sry didnt notice f(x,y)=sin((pi/2)*(x+y))

サインインしてコメントする。

採用された回答

Image Analyst
Image Analyst 2020 年 6 月 2 日
Try this:
% I need to calculate the value f(x,y)=sin((pi/2)*(x+y))
% for the function using the blending interpolation reffering to
% x0=-1, x1=1, y0=-1, y1=1 in point (1/3,1/3).
x0=-1, x1=1, y0=-1, y1=1;
x = x0 : 1/3 : x1
y = y0 : 1/3 : y1
[X, Y] = meshgrid(x, y);
fxy = sin((pi/2)*(X(:) + Y(:)))
fxy = reshape(fxy, length(y), length(x));
subplot(2, 1, 1);
surf(fxy);
title('surf(fxy)', 'FontSize', 15);
subplot(2, 1, 2);
imshow(fxy, []);
title('imshow(fxy)', 'FontSize', 15);
colormap(jet(256));
colorbar;
  5 件のコメント
Image Analyst
Image Analyst 2020 年 6 月 3 日
As with any variable, you can double click on fxy in the workspace panel and see the numerical values. If you want to see them before you call surf(), you can set a breakpoint on the surf() line and inspect the variable. Of course it doesn't change after surf() is called so it's the same at the very end of the function as it it before you call surf().
MAN MARIUS
MAN MARIUS 2020 年 6 月 3 日
Ty >)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by