How do you replace cells in one cell variable with another set of cells from another variable?

3 ビュー (過去 30 日間)
mzaya
mzaya 2016 年 2 月 18 日
編集済み: Stephen23 2016 年 2 月 18 日
I have one variable (1X30 cell) and I want to replace cells 21 through 30 with cells 21 through 30 from another variable (also 1X30 cell).

回答 (1 件)

Stephen23
Stephen23 2016 年 2 月 18 日
編集済み: Stephen23 2016 年 2 月 18 日
A(21:30) = B(21:30)
where A is the original cell array, and B contains the new values. The solution is easy using basic MATLAB indexing:

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by