필터 지우기
필터 지우기

Approximate plot for values of 0-10

조회 수: 1 (최근 30일)
ray sanchez
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;

채택된 답변

Salaheddin Hosseinzadeh
Salaheddin Hosseinzadeh 2015년 5월 7일
I guess you need to change the meshgrid()
[X,Y] = meshgrid(0:10);
I guess that's all!

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by