Eliminate the long number appearing in symbolic calculations
I am doing some symbolic calculations and end up with very large numbers in the symbolic expression. For example, I get the variable "term" as the result of my calculation:
syms J1
term = J1*(6582018229284824168619876730229377341315370891042652124695852093/13164036458569648337239753460458804039861886925068638906788872192 – 4302204281461843i/81129638414606681695789005144064);
It contains these long numbers. When I use vpa(), I get the following:
vpa(term)
How can I eliminate these small numbers with imaginary parts using vpa() or any other function? They should be rounded to zero. (I don’t want to take only the real part using the real() function because these numbers can show up as real part too.)I am doing some symbolic calculations and end up with very large numbers in the symbolic expression. For example, I get the variable "term" as the result of my calculation:
syms J1
term = J1*(6582018229284824168619876730229377341315370891042652124695852093/13164036458569648337239753460458804039861886925068638906788872192 – 4302204281461843i/81129638414606681695789005144064);
It contains these long numbers. When I use vpa(), I get the following:
vpa(term)
How can I eliminate these small numbers with imaginary parts using vpa() or any other function? They should be rounded to zero. (I don’t want to take only the real part using the real() function because these numbers can show up as real part too.) I am doing some symbolic calculations and end up with very large numbers in the symbolic expression. For example, I get the variable "term" as the result of my calculation:
syms J1
term = J1*(6582018229284824168619876730229377341315370891042652124695852093/13164036458569648337239753460458804039861886925068638906788872192 – 4302204281461843i/81129638414606681695789005144064);
It contains these long numbers. When I use vpa(), I get the following:
vpa(term)
How can I eliminate these small numbers with imaginary parts using vpa() or any other function? They should be rounded to zero. (I don’t want to take only the real part using the real() function because these numbers can show up as real part too.) vpa, symbolic, round MATLAB Answers — New Questions