Hi all,
I would like to assign a specific value to a specific position into an array.
The part of code where i'm getting error is:
y(0)= h2-0.36;
h2 is a double with value 0.8000
The error is:
??? Attempted to access (0); index must be a positive integer or logical.
Error in ==> Multipath_h1h2 at 20 y(0)= h2-0.36;
Thanks.
Raúl.

 採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 3 月 25 日
編集済み: Azzi Abdelmalek 2013 年 3 月 25 日

0 投票

The index must be positive integer or logical
Your are allowed to use
x(1),x(2),...
%or
x(logical(0)) and x(logical(1))
look at

1 件のコメント

Raúl
Raúl 2013 年 3 月 25 日
It works,
Thanks Azzi.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Matrix Indexing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by