ceceraj
Civil/Environmental
- Jan 6, 2006
- 1
Code:
hi,
I need a help with the code, I am unable to figure out how to get the desired output. I am new to matlab. Please help.
the code:
for p=1:resr(think resr=7.......p= 1 to 7 it will test first 1 then 2, 3,4 .....7 same like for loop in C)
[valmax,inmax]=max(res(p,
)/matlab command valmax= row, inmax=column/
if(valmax>0.7)&(valmax<=1)
concentration = 'High';
end
if(valmax>0.4)&(valmax<=0.7)
concentration = 'Medium';
end
if(valmax>=0.1)&(valmax<=0.4)
concentration = 'Low';
end
if(valmax<0.1)
concentration = 'No';
end
concentration..
Output
first 1st row as
'low'
second row as
'high'
third row as
'medium'
like 7th row as
'low'
The desired output
1st row as
'low'
second row as
'low'
'high'
third row as
'low'
'high'
'medium'
like 7th row as
'low'
''
''
''
''
''
''(7times)
Any help is really really appreciated.
thanks
cece
hi,
I need a help with the code, I am unable to figure out how to get the desired output. I am new to matlab. Please help.
the code:
for p=1:resr(think resr=7.......p= 1 to 7 it will test first 1 then 2, 3,4 .....7 same like for loop in C)
[valmax,inmax]=max(res(p,
if(valmax>0.7)&(valmax<=1)
concentration = 'High';
end
if(valmax>0.4)&(valmax<=0.7)
concentration = 'Medium';
end
if(valmax>=0.1)&(valmax<=0.4)
concentration = 'Low';
end
if(valmax<0.1)
concentration = 'No';
end
concentration..
Output
first 1st row as
'low'
second row as
'high'
third row as
'medium'
like 7th row as
'low'
The desired output
1st row as
'low'
second row as
'low'
'high'
third row as
'low'
'high'
'medium'
like 7th row as
'low'
''
''
''
''
''
''(7times)
Any help is really really appreciated.
thanks
cece