Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline MN283  
#1 Posted : 04 April 2024 02:10:07(UTC)
MN283

Rank: Newbie

Groups: Registered
Joined: 04/04/2024(UTC)
Posts: 2

Hi SMath community,

I would like to calculate the variance() and StdDev() of the second column "V(3v3)" of the attached file with 50k datapoints. Unfortunately the calculation takes forever (aborted it after 30min).

The file is an export of a circuit simulation result (gaussian tolerance distribution in LTSpice). Originally it is in .txt-Format and it seems that I have to convert it in excel to .csv-Format before I can use is. I attached both, the original LTSpice export (.txt) and the converted one from Excel (.csv).

How can I handle this in sMath?

Archiv.zip (586kb) downloaded 8 time(s).

Thanks in advance,
Marc

Edited by user 04 April 2024 02:21:02(UTC)  | Reason: Not specified

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Davide Carpi  
#2 Posted : 04 April 2024 04:34:03(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,648
Man
Italy
Location: Italy

Was thanked: 1331 time(s) in 876 post(s)
With import file functions you might need to set the optimization to numeric to speed up the loading.
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline MN283  
#3 Posted : 04 April 2024 05:32:05(UTC)
MN283

Rank: Newbie

Groups: Registered
Joined: 04/04/2024(UTC)
Posts: 2

Optimizations were all set to numeric - did not help. What helped was that I substituted the statistic function variance() and StdDev with the original/native formula for the variance and standard deviation.

This speeds it up to around 1s.

Don´t know what happens inside the functions of the statistic plugin but it is very slow.

calculation.png

Thanks
Offline gth802s  
#4 Posted : 11 April 2024 12:24:17(UTC)
gth802s


Rank: Member

Groups: Registered
Joined: 21/11/2023(UTC)
Posts: 24
United States

Was thanked: 2 time(s) in 2 post(s)
I have noticed the same thing; the built-in function for standard deviation takes forever but the calculation runs pretty quickly if I just code in the formula in the worksheet.
Offline Davide Carpi  
#5 Posted : 12 April 2024 22:53:41(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,648
Man
Italy
Location: Italy

Was thanked: 1331 time(s) in 876 post(s)
Confirmed, the bottleneck seems to be in the final ouput processing to return the result from the equation [f.e. 1/{n-1}*sum(((el(X,i)-mean)^2),i,1,n)) for StdDev]; no idea not sure what could be the cause...
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.