フィルターのクリア

How to put cell array or a double in a existing double?

2 ビュー (過去 30 日間)
Behrooz Daneshian
Behrooz Daneshian 2023 年 1 月 21 日
コメント済み: dpb 2023 年 1 月 21 日
Hi all,
I have created a double called "stations3". I need to insert below double in row one and column 6 of the stations3 (actually . Is it possible? How can I do that.
(stations3(1,2)/stations3(1,4))*(0.17+0.75*0.01*mean_w)./(144*0.01*mean_w)
  1 件のコメント
dpb
dpb 2023 年 1 月 21 日
>> load stations3
>> load mean_w
>> (stations3(1,2)/stations3(1,4))*(0.17+0.75*0.01*mean_w)./(144*0.01*mean_w)
ans =
0.0878 0.0796 0.0736 0.0690 0.0654 0.0624 0.0600 0.0580 0.0563 0.0548
>>
Your expression abvoe is a 1x10 vector; that can't go into a single location inside a double array; as Dolly Parton told Johnny Carson late one night on the old Tonight Show, "You just can't put 10-lb of 'taters in a 5-lb tote!".
What does the expression above mean, anyway, and how is it related to the content of a single location in the original station3? Doesn't look as though it would make any sense to do such if if you could.
Since the original array is of same number of columns as the length of the mean_w vector, you could replace the whole first row with the computed array, but again, whether that would make any sense is nothing we can determine, nor recommend for or against doing having absolutely no idea what you're attempting to do here nor any justification for the above expression.
To put an array into a single location, one would have to use a cell array and to do that would require turning the whole original stations3 array into a cell array...why would want to do that also is not anything we can judge the reasonableness of without any other background.
Let's back up and present the rationale behind the request so perhaps somebody can provide a useful solution to the real problem to be solved.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by