#1 closed defect (fixed)
frecuency function looses a unit after second period.
| Reported by: | manuelb | Owned by: | Jorge |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | Math | Version: | 1.1.1 |
| Severity: | normal | Keywords: | TOL-Type TOL |
| Cc: |
Description
The "frecuency" function does not have equal sizes. It looses a unit after the second period:
Matrix a = SetMat(Range(1, 100, 1)?);
Matrix b = Frequency(Tra(a), 10);
Change History (11)
comment:1 Changed 22 years ago by
| Status: | new → assigned |
|---|
comment:2 Changed 22 years ago by
| Owner: | changed from danirus to jsperez |
|---|---|
| Status: | assigned → new |
comment:3 Changed 22 years ago by
Really the problem with this functions is that the upper limit is missing, and it seems
that Frecuency is leaving a unit in each interval.
The functions divides the interval (min, max) in m parts of size k = (max-min)/m
and then the functions only uses the intervals:
(min, min+k) --> Print min+k
(min+k, min+2k) --> Print min+2k
...
(min+(m-2)k, min+(m-1)k)--> Print min+(m-1)k
(min+(m-1)k, max)--> Is Missing
So, if you put an interval (min,max) that min+(m-1)k >= MaxMat(M) the problem
disapears.
comment:4 Changed 22 years ago by
| Component: | TOL Functions → Matrix |
|---|---|
| Keywords: | TOL-Type added; TOL removed |
| product: | TOL → TOL-Type |
Reassign to the Tol-Type product.
comment:5 Changed 22 years ago by
| Component: | Matrix → TYPE_Matrix |
|---|---|
| Keywords: | Functions removed |
| product: | TOL Functions → TOL |
Moved to the TOL product.
comment:6 Changed 22 years ago by
| Status: | new → assigned |
|---|
comment:7 Changed 22 years ago by
| Owner: | changed from jsperez to Jorge |
|---|---|
| Status: | assigned → new |
Login changed
comment:9 Changed 22 years ago by
| Status: | new → assigned |
|---|
comment:10 Changed 19 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
See the results where all intervals have the same length = 9.9
Matrix a = SetMat(Range(1, 100, 1)?);
Matrix b = Frequency(Tra(a), 10, 1, 100);
Set lengths = For(1,10, Real (Real idx)
{If(idx==1,MatDat(b,1,1)-1,MatDat(b,idx,1)-MatDat(b,idx-1,1))});
comment:11 Changed 19 years ago by
| bug_file_loc: | → http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/Bugzilla/bug_000001/ |
|---|

There're more bugs waiting. Mathematicals errors are first assigned to Jorge.