Error in size inputs scalar

can somebody tell me why I am getting an error called' Error using zeros. Size inputs must be scalar' for the below first code.
x=5:1:15;
y=5:1:15;
z=5:1:15;
B=zeros(x,y,z);
And If Give the inputs like below no errors.But I want to simplify the code.
x=5,6,7,8,9,10,11,12,13,14,15;
y=5,6,7,8,9,10,11,12,13,14,15;
z=5,6,7,8,9,10,11,12,13,14,15;
B=zeros(x,y,z);

回答 (0 件)

この質問は閉じられています。

製品

リリース

R2017a

タグ

質問済み:

2020 年 7 月 25 日

閉鎖済み:

2020 年 7 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by