How to solve a symbolic script expression within a cell and assign the answer to a new variable
    7 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Nate
 el 28 de Sept. de 2014
  
    
    
    
    
    Comentada: Star Strider
      
      
 el 29 de Sept. de 2014
            I have a 1x1 symbolic object (X) containing the following symbolic expression:
int(T - 2*t, t, 0, T)
I want to create a new variable (a0) that is simply the result of the above integration.
I can obtain the result by calling out the symbolic expression in the command window, copying and pasting it back into the command window and hitting enter (answer = 0).
How do I do this without copy and pasting?
Thanks
0 comentarios
Respuesta aceptada
  Star Strider
      
      
 el 28 de Sept. de 2014
        
      Editada: Star Strider
      
      
 el 28 de Sept. de 2014
  
      Assign it to a variable:
syms t T 
a0 = int(T - 2*t, t, 0, T)
produces:
a0 =
0
9 comentarios
  Star Strider
      
      
 el 29 de Sept. de 2014
				My pleasure!
I have R2014a as well. I have no idea what the difference in output could be due to.
Más respuestas (0)
Ver también
Categorías
				Más información sobre Special Values 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!