why can't i see the values of the numbers in my matrix?
조회 수: 4 (최근 30일)
이전 댓글 표시
i have used the ode23() function, to find a solution of some differential equations. As out put i gives me a cetor "t", and a matrix "x" with the solutions.
The problem is that i can't see the calculated values in the "x" matrice. in the works space window there is no problem, and for example the first column of the matrix looks something like this:
col 1:
1,00000000000000
0,999339985727093
0,995074819302742
0,983756810994156
0,961909664741749
0,926035719167643
...
but if i type "x(:,1)" in the command window, this is my output:
ans =
1.0e+018 *
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
0.0000
...
why does it say 1.0e+18 ?
if i type "x(4,1)" i'll get this:
ans =
0.9838
so clearly the numbers are there, but i can't see them or use them, because of the 1.0e+18
This gives me a problem when i want to use the solution to calculate something, and it also gives me a problem if i want to plot the solution. I just can't see anything but zero unless the numbers get large enough, which they does at the end of the timescale.
does anybody know, why this happens?
thx :)
댓글 수: 0
채택된 답변
Azzi Abdelmalek
2012년 10월 21일
편집: Azzi Abdelmalek
2012년 10월 21일
It says 1.0e+18 because, some of your numbers are near 1.0e+18. It will not display 123444444444444444. then the other numbers which are smaller, for example 10 will be displayed 0.00000000000000001 e+18, because of your short or even long format you will see
0.0000 e+18
댓글 수: 0
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!