t = linspace(0,2,100)
x = linspace(0,10,100)
U(t,x) = 10*sin(2*pi*(t-x/5))+2*sin(2*pi*(t+x/5))

 채택된 답변

Walter Roberson
Walter Roberson 2014년 4월 27일

0 개 추천

You cannot use 0 or fractions in your indices into U.
The syntax you are using is not a function definition: the syntax is an array access.
Use
U = 10 * sin(2 * pi * (t-x/5)) + 2 * sin(2 * pi * (t+x/5));

추가 답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2014년 4월 27일

0 개 추천

t = linspace(0,2,100)
x = linspace(0,10,100)
U= 10*sin(2*pi*(t-x/5))+2*sin(2*pi*(t+x/5))

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

질문:

2014년 4월 27일

댓글:

2014년 4월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by