Symbolic entry of rem function
    4 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
    Nate
 am 27 Sep. 2014
  
    
    
    
    
    Kommentiert: DmArcher
 am 24 Apr. 2017
            When entering the following symbolic code using the remainder (rem) function, Matlab returns x(t,P) = 0, which is clearly wrong.
syms t P
x(t, P) = rem(t,P);
x
I have tried all combinations of sym, syms, symfun, but the result is the same. I need to enter the symbolic function x = rem(t,P) to perform symbolic integration on it over the period t = [0:P].
Help is appreciated, thanks
0 Kommentare
Akzeptierte Antwort
  Star Strider
      
      
 am 27 Sep. 2014
        Wrong function. Use mod instead for symbolic operations:
syms t P
x(t, P) = mod(t,P);
x
returns:
x(t, P) =
t*(1 mod P)
5 Kommentare
  DmArcher
 am 24 Apr. 2017
				When I type your code I get some errors. Is it possible that you can tell me where I did it wrong? Thx.

Weitere Antworten (0)
Siehe auch
Kategorien
				Mehr zu Conversion Between Symbolic and Numeric finden Sie in Help Center und File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!