I tried this but didn't work [x,y]=meshgrid(-5:5) z=x*y Plot3(x,y,z)

 채택된 답변

Star Strider
Star Strider 2017년 12월 7일

1 개 추천

Try this:
z = x .* y;
You need to do ‘element-wise’ multiplication, and adding the ‘dot operator’, changing (*) to (.*). will do this.
See the documentation on Array vs. Matrix Operations (link) for details.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Line Plots에 대해 자세히 알아보기

태그

질문:

2017년 12월 7일

답변:

2017년 12월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by