필터 지우기
필터 지우기

2D plot of x*sin(1/x)

조회 수: 6 (최근 30일)
feeroz babu
feeroz babu 2020년 12월 15일
댓글: Stephen23 2020년 12월 15일
x = [-1/pi:0.01:1/pi];
y = x*(sin(1/x));
plot(x,y)

채택된 답변

KSSV
KSSV 2020년 12월 15일
편집: KSSV 2020년 12월 15일
x = [-1/pi:0.01:1/pi];
y = x.*(sin(1./x)); %<------ element by element operation
plot(x,y)
  댓글 수: 1
feeroz babu
feeroz babu 2020년 12월 15일
Thank you

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Walter Roberson
Walter Roberson 2020년 12월 15일
y = x.*(sin(1./x));
In MATLAB the * operator is algebraic matrix multiplication (inner product) and the / operator is matrix division (which is similar to matrix multiplication by pinv() of the array)

카테고리

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

태그

제품


릴리스

R2014b

Community Treasure Hunt

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

Start Hunting!

Translated by