Running long simulations on Matlab Online
Show older comments
Hi all,
I have Monte-Carlo simulations that take hours to finish (~ 17 hours). I was using a Desktop in my university Lab for this purpose, where I can keep it ON for days. But unfortunately, now I can't access it and I can't run Matlab on my laptop for that long time. By coincidence I discovered Matlab Online, and I'm wondering now is there a way to keep my code running on it even after I log out. Also, can it run 'parfor'.
Best Regards,
1 Comment
AKASH BHOYAR
on 27 Dec 2021
Even I have similar kind of computation requirement (approx 72hours). Any ideas by anybody ?
Accepted Answer
More Answers (2)
Walter Roberson
on 7 Nov 2017
1 vote
Unfortunately, MATLAB Online will not keep running after you log out, and it also has an interaction time-out of 50 minutes.
I have no information about whether it can run parfor.
4 Comments
Wolfgang Schwanghart
on 8 Aug 2019
I don't think so. I just tried
gcp
and it returns an empty pool object.
Walter Roberson
on 8 Aug 2019
Indeed, Parallel Computing Toolbox is not one of the supported toolboxes listed at https://www.mathworks.com/products/matlab-online/limitations.html at present.
Walter Roberson
on 29 May 2020
MATLAB Online only permits something less than 5 minutes of computation at a time, so it could not be used for this purpose anyhow.
Sugar Mummy
on 7 Jan 2022
Hi @Walter Roberson I am using MATLAB-academic. My model is running fine for small time interval but not for long time simulation (~ 1800000 sec). Can you guide regarding this?
Anil Jangid
on 29 May 2020
0 votes
Background
You can add a custom function at the end of your script. For data preprocessing, the function should take the data returned from the datastore as input. It should return the transformed data as output.
function dataout = functionName(datain)
% do something with datain
dataout = ...
end
TASKCreate a function called scale at the end of the script that performs the following operations:
data.Time = (data.Time - data.Time(1))/1000;
data.X = 1.5*data.X;
Because these commands modify the variable data directly, your function should use data as both the input and output variable.
Note that the third line of the script calls the scale function. Your script won't run until this function has been created.
Also note that local functions must be at the end of a script. This means you will be editing the script sections out of order in this interaction. The section headings show which section of the script to edit in each task.
1 Comment
Walter Roberson
on 29 May 2020
This is not a solution to the question asked.
Communities
More Answers in the Distance Learning Community
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!