# Datafit error message: Hot restart: dimension of working table (argument n:-245447011)

**URL:** <https://scilab.discourse.group/t/datafit-error-message-hot-restart-dimension-of-working-table-argument-n-245447011/1053>\
**Category:** Modeling and simulation\
**Created:** [October 5, 2025, 7:13am UTC](https://scilab.discourse.group/t/datafit-error-message-hot-restart-dimension-of-working-table-argument-n-245447011/1053 "2025-10-05T07:13:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Samuel.Enibe2](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@Samuel.Enibe2](https://scilab.discourse.group/u/Samuel.Enibe2)\
**Post date:** [October 5, 2025, 7:13am UTC](https://scilab.discourse.group/t/datafit-error-message-hot-restart-dimension-of-working-table-argument-n-245447011/1053/1 "2025-10-05T07:13:32Z")

</div>

I have tried to use the datafit function to solve a non linear regression problem. It generates the error message “Hot restart: dimension of working table (argument n:-245447011).”

I have changed the initial estimates but notice the same problem.

Any assistance to solve this problem will be appreciated. The full script is attached.

[kinetic\_datafit\_regression.sce](https://scilab.discourse.group/uploads/short-url/pu5bXLySfeAOf1liH49wbtmXVbB.sce) (6.5 KB)

---

<div class="post-metadata">

**Author:** ![mottelet](https://yyz2.discourse-cdn.com/free1/user_avatar/scilab.discourse.group/mottelet/32/13_2.png) [@mottelet](https://scilab.discourse.group/u/mottelet)\
**Post date:** [October 6, 2025, 7:10am UTC](https://scilab.discourse.group/t/datafit-error-message-hot-restart-dimension-of-working-table-argument-n-245447011/1053/2 "2025-10-06T07:10:49Z")

</div>

You are not using datafit correctly (read carefully the documentation to see the role of each argument). In addition, using `datafit` is not a good idea as this function seems to have a broken mecanism for the kind of data/model output you have (successive vector values of ode states). I recommend using basic `leastsq` which has the same features (in fact `datafit` uses `leastsq` so …), considering that you only need to vectorize the residual matrix yourself (the output of `kinetic_gap_ode` in your code). Please find the modified script attached to this message. Just a last remark: your ode model seems not to fit well the data (but this is not due to `leastsq` itself).

S.

[kinetic\_datafit\_regression.sce](https://scilab.discourse.group/uploads/short-url/1ZjN9xiXVdvTJcSKQeUVqmuTHiW.sce) (6.4 KB)

---

<div class="post-metadata">

**Author:** ![Samuel.Enibe2](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@Samuel.Enibe2](https://scilab.discourse.group/u/Samuel.Enibe2)\
**Post date:** [October 6, 2025, 1:57pm UTC](https://scilab.discourse.group/t/datafit-error-message-hot-restart-dimension-of-working-table-argument-n-245447011/1053/3 "2025-10-06T13:57:44Z")

</div>

Thank you very much. I noticed the omission of the kinetic.cdot function. I sent a corrected version. I am also looking at suggestions from the SCILAB community to make it work correctly.

Samuel Enibe
