Error in displaying the whole matrix

3 ビュー (過去 30 日間)
Elzbieta
Elzbieta 2024 年 8 月 26 日
編集済み: Walter Roberson 2024 年 8 月 26 日
Hello,
When I try to display the whole matrix I receive the data in the following shape:
-0.0008 0.0001 0.0000
-0.0005 0.0001 0.0000
-0.0004 0.0001 0.0000
-0.0002 0.0001 0.0000
-0.0000 0.0001 0.0000
However when I attempt to display the portion of matrix teh result is correct:
-823 8 1
-584 8 1
-409 8 1
-304.928530000000 8 1
-298.500000000000 8 1
-300.750000000000 8 1
The content of the workspace variable is correct.
The code responsible for this is as follows:
filename = {'Alessandra' 'Alfredo'};
dataConditionDevice = [];
for ifile=1:1%length(filename)
filename{ifile}
filenameEditedTxt = fullfile(pathDataActivityDevice,[filename{ifile},'_trial_data.txt'])
dataConditionDevice = load(filenameEditedTxt);
end
Regards

採用された回答

Aquatris
Aquatris 2024 年 8 月 26 日
編集済み: Aquatris 2024 年 8 月 26 日
Ther eis probably a 1e6 at the top of the display. You can do 'format bank' to mitigate this if you want or any other format options. Example:
% random matrix with entries that vary in magnitude
A = [-823 8 1e6
-584 8 1
-409 8 1
-304.928530000000 8 1
-298.500000000000 8 1
-300.750000000000 8 1];
% display the matrix
A
A = 6x3
1.0e+06 * -0.0008 0.0000 1.0000 -0.0006 0.0000 0.0000 -0.0004 0.0000 0.0000 -0.0003 0.0000 0.0000 -0.0003 0.0000 0.0000 -0.0003 0.0000 0.0000
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
% display subsection of matrix
A(1:2,1:2)
ans = 2x2
-823 8 -584 8
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
% display via format bank
format bank
A
A = 6x3
1.0e+00 * -823.00 8.00 1000000.00 -584.00 8.00 1.00 -409.00 8.00 1.00 -304.93 8.00 1.00 -298.50 8.00 1.00 -300.75 8.00 1.00
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFilter Banks についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by