필터 지우기
필터 지우기

output for for loop is not showing

조회 수: 1 (최근 30일)
Abhijit Sardar
Abhijit Sardar 2021년 1월 3일
답변: Marcin Kaliszewski 2021년 1월 3일
this is my code for finding the value of the data has 90000 rows but i am only getting ine answer please help
m = load('c12.5_17day_1a.TXT');
hits = cumsum (m(:,1));
new = [m hits];
sig = [m(:,18)]';
N = (new(:,20))';
p= length(N);
j= [repmat(1,1,50) repmat(50,1,p)];
for i = 1:p
if hits(i)<=50
k=0;
elseif 50<=hits(i)<=200
k = hits(i) - 30;
elseif 201<= hits(i)<=500
k = 0.85 * hits(i);
elseif hits(i) >= 500
k = hits - 75;
end
end

답변 (1개)

Marcin Kaliszewski
Marcin Kaliszewski 2021년 1월 3일
Hi,
Can you append the file you load in a script?
Regards,
Marcin Kaliszewski

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by