필터 지우기
필터 지우기

function plotting in matlab

조회 수: 1 (최근 30일)
Rasmus
Rasmus 2014년 2월 23일
답변: Mischa Kim 2014년 2월 23일
Hello! :)
I want to plot this function in a graph, but for some reason it doesn't want to that.
this is the function:
a(x-x0)+b*exp(-power((x-xc),2)/lambda)
I already have a group of data, for x and y, and i need to get this function to follow that plot as close as possible.
how do i plot it into ?

채택된 답변

Mischa Kim
Mischa Kim 2014년 2월 23일
Rasmus, check out:
x = 0:0.1:10;
lambda = 2;
a = 1;
b = 1;
x0 = 1;
xc = 1;
y = a*(x-x0)+b*exp(-((x-xc).^2)/lambda);
plot(x,y)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by