×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

need a small help with a simple code

need a small help with a simple code

need a small help with a simple code

(OP)
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

RE: need a small help with a simple code

What do you want to do?  how did you get this far?  In your development of this code, where did it stop working and what did you introduce that gave you the unexpected oputput?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources