Approximate plot for values of 0-10
1 回表示 (過去 30 日間)
古いコメントを表示
ray sanchez
2015 年 5 月 7 日
回答済み: Salaheddin Hosseinzadeh
2015 年 5 月 7 日
How would I take this plot and approximate it only for the values R = 0, 1, 2..., 10?
if true
clear; close all; clc;
[X,Y]=meshgrid(-20:0.1:20);
R = sqrt(X.^2 + Y.^2);
J=besselj(1,R);
Z=(J./R);
Z(isnan(Z)) = 0.5;
surf(X,Y,Z);
shading flat;
camlight;
0 件のコメント
採用された回答
Salaheddin Hosseinzadeh
2015 年 5 月 7 日
I guess you need to change the meshgrid()
[X,Y] = meshgrid(0:10);
I guess that's all!
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Lighting, Transparency, and Shading についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!