Error using besselj. NU and Z must be the same size or one must be a scalar.

1 回表示 (過去 30 日間)
Ba Ba Black Sheep!
Ba Ba Black Sheep! 2017 年 1 月 19 日
回答済み: Steven Lord 2017 年 1 月 20 日
What is wrong with the following program?
Z = (0:0.2:9)';
NU = 0:5;
y = besselj(NU, Z); % Bessel function
plot(Z, y)
xlabel('Z');
ylabel('y');
title('y = besselj(NU, Z), for alpha = 0,1,2,3,4, and 5');
Output:
>> plotting
Error using besselj
NU and Z must be the same size or one must be a scalar.
Error in plotting (line 3)
y = besselj(NU, Z); % Bessel function
See:
Figure 3.6 Plotting the matrix y versus the vector x.

採用された回答

Steven Lord
Steven Lord 2017 年 1 月 20 日
That textbook was written quite some time ago. At the time it was written that syntax worked, but it was removed in release R2012b.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeBessel functions についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by