To repeat calculation in a matrix
    4 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Vahid Esmaeili
 el 7 de Ag. de 2020
  
    
    
    
    
    Respondida: Alan Stevens
      
      
 el 7 de Ag. de 2020
            Hello,
I have an easy question for experts. Would you please assist me with the following issue? 
I have RAJ_Mx1.mat ( 9 rows and 100 column) and  RHMORx.mat  ( 9 rows and 100 column) . Please find the attached files. I want to apply the following line using a loop to calculate a peak (max) in each row separately. So, I have to get a matrix with 9 columns and 1 row as an answer. I tried several ways but it does not work! 
peakMOM_pos_R_Hip_sag_pos_power= max( RAJ_Mx1(RHMORx>0)) 
0 comentarios
Respuesta aceptada
  Alan Stevens
      
      
 el 7 de Ag. de 2020
        Do you mean you want the maximum of the rows in  RAJ_Mx1 taking into consideration only those values where the corresponding elements in RHMORx are greater than zero?  If so, then:
M = RAJ_Mx1.*(RHMORx>0);
max(M')
0 comentarios
Más respuestas (0)
Ver también
Categorías
				Más información sobre Get Started with MATLAB en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

