How can I show only the data from variable?

1 回表示 (過去 30 日間)
Phudit Kanittasut
Phudit Kanittasut 2021 年 4 月 27 日
コメント済み: Phudit Kanittasut 2021 年 4 月 27 日
clear
Data = readmatrix('brain_liver.csv');
%normalization
rows=length(Data)
cols=width(Data)
for j = 1:rows
Datanorm(j,cols) = Data(j,1)
end
for j = 1:rows
for i = 1:cols-1
Datanorm(j,i) = Data(j,i+1)
end
end
for j = 1:rows
for i = 1:cols-1
Datanorm(j,i) = Data(j,i+1) .* 100/max(Data(:,i+1));
end
end
Datanorm(:,cols)=[]
S = std(Datanorm,[],2);
%dimension
[Max, MaxIndex] = maxk(S,3);
A=MaxIndex(1,1)
for i = 1:12
MaxIndex(1,i+1)=Datanorm(A,i)
end
B=MaxIndex(2,1)
for i = 1:12
MaxIndex(2,i+1)=Datanorm(B,i)
end
C=MaxIndex(3,1)
for i = 1:12
MaxIndex(3,i+1)=Datanorm(C,i)
end
for j = 1:rows
for i = 1:cols-1
NewDatanorm(j,i+1) = Datanorm(j,i)
end
end
for i=1:rows
NewDatanorm(i,1)=Data(i,1)
end
Tp = [A B C]
Top = transpose(Tp)
%Index from 3 tops
% 12 30 44
How can I show the data from Top variable

回答 (1 件)

John D'Errico
John D'Errico 2021 年 4 月 27 日
Use semi-colons at the end of those lines where you do not want to see all the crapola dumped to the command window.
  1 件のコメント
Phudit Kanittasut
Phudit Kanittasut 2021 年 4 月 27 日
A B C is the row of the data that have 3 highest value but I want to show tha data from datanorm from A B and C row

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

カテゴリ

Help Center および File ExchangeContinuous Wavelet Transforms についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by