# How to plot 3_D graph of function K*exp(-r^2/R^2) where "r" is the radial cordinate and "R" is the variation of R along the thickness

1 visualizzazione (ultimi 30 giorni)
ALOK il 26 Apr 2023
Commentato: ALOK il 27 Apr 2023
##### 5 CommentiMostra 3 commenti meno recentiNascondi 3 commenti meno recenti
Dyuman Joshi il 26 Apr 2023
Is this the output you want to achieve?
d=0.0035;
R=0.0019;
r=0.004;
q=1200;
f=@(y) (R-(((R-r).*(d-y))./d));%{where re is R, and r is the ri}
Qfun=@(x,y) q.*exp(-(x.^2+y.^2)./f(y).^2);
Qhandle = fsurf(Qfun,[-5 5 -5 5]);
ALOK il 27 Apr 2023
this i want

Accedi per commentare.

### Risposte (1)

Ganapathi Subramanian il 26 Apr 2023
Modificato: Ganapathi Subramanian il 26 Apr 2023
Hi Alok,
It is my understanding that you want to plot a 3D graph for the given function. Use ‘fsurf’ function to plot 3D graph for the given variables ‘r’ and ‘R’ and the function.
fsurf(@(r,R) f)
% where r,R are the variables and f is the function.
##### 0 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti

Accedi per commentare.

### Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

R2023a

### Community Treasure Hunt

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

Start Hunting!

Translated by