how to find min and max and average value in 2D chart 5x20

1 Ansicht (letzte 30 Tage)
andrew moisidi
andrew moisidi am 26 Mai 2021
Bearbeitet: andrew moisidi am 26 Mai 2021
hi i need help !
i have this problem :
if i run it he ask me what of all these function use i type 1 bcs my problem is it.After matlab starting and runing the first function
in a getCurrentAverage.m file that returns the N position vector with the current values in each YC product, the N position vector with the lowest values in each YMIN product, the N position vector with the highest values in each YMAX product and the N positions with average prices on each YA product.with using repeat FOR
%Áñ÷éêüò êþäéêáò project
filename = 'data.csv'; %filename of data file
%Ôï áñ÷åßï ðñÝðåé íá Ý÷åé 5 ãñáììÝò êáé 20 óôÞëåò üðùò ôï data.csv
X = csvread(filename); %Reading the data
%Ïíüìáôá ðñïúïíôùí - èá ÷ñåéáóôåß åäþ íá âÜëåôå ôá äéêÜ óáò
Names{1} = 'xiaomi redmi note 9';
Names{2} = 'xiaomi redmi 9c';
Names{3} = 'huawei p smart 2020';
Names{4} = 'xiaomi redmi 9';
Names{5} = 'samsung galaxy A21';
N = size(X,1); %N = 5
M = size(X,2); %M = 20
%èá ÷ñåéáóôåß íá áëëÜîåôå ôï ðáñáêÜôù ìýíçìá s óýìöùíá ìå ôçí åêöþíçóç
s = sprintf('Dwse 0 gia exit,\n 1 gia ektelesh ths getCurrentMinMaxAverage, \n 2 gia ektelesh ths plotProducts,\n 3 gia ektelesh ths sortProducts,\n4 gia ektelesh ths plotBestModel,\n5 gia ektelesh ths getCorrelated');
ok = 1;
while ok ~= 0,
ok = input(s);
%èá ÷ñåéáóôåß íá áëëÜîåôå ôïí ðáñáêÜôù êþäéêá óýìöùíá ìå ôçí åêöþíçóç
if ok == 0,
disp('Exit');
elseif ok == 1,
[YC,YMIN,YMAX,YA] = getCurrentMinMaxAverage(X,Names);
elseif ok == 2,
[Y] = plotProducts(X,Names);
elseif ok == 3,
[Y] = sortProducts(X,Names);
elseif ok == 4,
[Y] = plotBestModel(X,Names);
elseif ok == 5,
[a,b,c,d] = getCorrelated(X,Names);
else
disp('La8os eisodos');
end
end

Antworten (0)

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by