Hi, I wrote a script file and in that am solving some equations to get y1, y2. Now y1 = (some equation) and y2 = y1+2. Solving it I am getting y1 = -1.7383e-17 and y2 = 2 but I want it to solve and save values as either y1 = 0, y2 = 2 OR y1 = -1.7383e-17 and y2 = 2-(1.7383e-17) i.e, y2<2. I tried to set precision to 4 in beginning of my script file by giving command: digits(4); but still I am getting the same result. Thanks in advance.
MATLAB: Decrease precision of decimal no value saved for a variable.
MATLABprecision
Related Question
- I have the corner coordinates for a rectangle in 3d space how do i find the coordinates for the center of the rectangle
- How to use <, > operator as I intended
- I’m trying to do a Taylor series method for the equation y and compare it to the analytical solution. However, I keep getting a matrix dimension error. any help would be much appreciated.
- How to call vector in matrix with condition
- Graph intersection of 3 curves
Best Answer