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

1 visualización (últimos 30 días)
Behrooz Daneshian
Behrooz Daneshian el 21 de En. de 2023
Comentada: dpb el 21 de En. de 2023
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 comentario
dpb
dpb el 21 de En. de 2023
>> 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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Characters and Strings en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by