Question: MATLAB Logical Operations Question: So I'm streaming real time EMG data and it produces a 1x8 matrix named: emgg. I want to make a conditonal

MATLAB Logical Operations Question:

So I'm streaming real time EMG data and it produces a 1x8 matrix named: emgg. I want to make a conditonal statement that if all the emg signals are within a specific range (e.g emgg(4)) or specified discrete numbers ( e.g. emgg(1) ) that it should display ('true'). The problem is, while streaming data it produces 'true' despite the signals not matching the values I specified. Is something wrong with my syntax? If so, how can I go about fixing it, thanks.

if (emgg(1) == -0.0391 || -0.0234 || -.0078 || -.0313 || -0.0156 || 0.0078 || 0 || 0.0156) && (emgg(2)== -0.0703 || -.0469 || -.0234 || 0 || -.0391 || -.0313 || -.0156 || -.0078 || .0078 || .0156 || .0234) && (-.2422

disp('True')

else

disp( ' Not True')

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!