Division creating many columns
    4 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    William Garrett
 el 8 de Abr. de 2020
  
    
    
    
    
    Respondida: Steven Lord
    
      
 el 8 de Abr. de 2020
            I am trying to calculate the % decrease of air pollution in two seperate scenarios and put the answer in a new column variable
However, when I do this it creates the same number of columns as in my table already, all populated with 0, and 1 column the correct answer.
When i split up this code and do it seperately it occurs during the division step
I am using the following code:
Table.PnC_Removal = (((Table.Concentration_S1 - Table.Concentration_S2)/ Table.Concentration_S1)* 100)
0 comentarios
Respuesta aceptada
  Steven Lord
    
      
 el 8 de Abr. de 2020
        Use element-wise division not matrix division.
Table.PnC_Removal = (((Table.Concentration_S1 - Table.Concentration_S2)./ Table.Concentration_S1)* 100)
Note the extra period that's part of the division sign.
0 comentarios
Más respuestas (0)
Ver también
Categorías
				Más información sobre Logical en Help Center y File Exchange.
			
	Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

