Multiplying a column in a table by a constant
    21 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Timothy
 el 17 de Ag. de 2023
  
    
    
    
    
    Comentada: Voss
      
      
 el 7 de Sept. de 2024
            Hello,
I need to multiply a one-column table by e^-9.  I don't know MATLAB code, so this is new to me.  How can I do this please, any help would be appreciated.  
Thank you,
Tim
0 comentarios
Respuesta aceptada
  Walter Roberson
      
      
 el 17 de Ag. de 2023
        
      Editada: Walter Roberson
      
      
 el 18 de Ag. de 2023
  
      YourTableName.NameOfColumn = YourTableName.nameOfColumn * 1e-9;
The above is the recommended form. 
If, for some reason, you do not know hte column name, but you know the column number, then
YourTableName.(ColumnNumber) = YourTableName.(ColumnNumber) * 1e-9;
3 comentarios
  Zachary
 el 7 de Sept. de 2024
				I am trying to change units in my column. I want to go from mm to cm, so I just divide by 10. At the same time, I want to keep the original column value. How would you do that?
Más respuestas (0)
Ver también
Categorías
				Más información sobre Logical 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!