フィルターのクリア

Values from workspace change

1 回表示 (過去 30 日間)
Joel Schelander
Joel Schelander 2021 年 2 月 25 日
回答済み: Steven Lord 2021 年 2 月 25 日
I have a vector with values:
DH=[0 0 0 0 0 0 3.95 1009.15 0]
I insert the DH in a matrix
TimeofHomeArrival=[Home; DateVector(:,4).'; DateVector(:,5).'; DateVector(:,6).'; DH];
The values in the matrix are however now different than from the workspace
TimeofHomeArrival(5,:)=[ 0 0 0 0 0 0 4 127 0]

採用された回答

Steven Lord
Steven Lord 2021 年 2 月 25 日
Home is an int8 array. When you combined the int8 data with the double data, the double data was converted to int8. See this documentation page and the "Largest and Smallest Values for Integer Classes" section on this documentation page for more information.
If you want to make TimeOfHomeArrival a double array you'll need to convert the int8 data into double by calling double on it.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by