Making Vector Elements Cumulative - Adding Vector Elements down the column - 消息
In the attachment at the start of Page.5 I (so far) am unable to construct a loop or something that cumulatively adds vector elements down the column. So I am manually doing this for now, any ideas?

I have started additions from the 6th element because first x4 were zero ...but I think you get the idea!
https://imgur.com/7KSBDM8
Secondly in the last page there is a 2D-graph. One can easily read the intersection of two lines however is there any solution to find the intercept of two lines when they aren't functions but are rather data points?
Remembraning.sm (38.42 KiB)已下载 1166 次。

I have started additions from the 6th element because first x4 were zero ...but I think you get the idea!
https://imgur.com/7KSBDM8
Secondly in the last page there is a 2D-graph. One can easily read the intersection of two lines however is there any solution to find the intercept of two lines when they aren't functions but are rather data points?
Remembraning.sm (38.42 KiB)已下载 1166 次。
no no ...I think I was unable to make you understand. The summation gives one value ...instead I wanted to have a cumulative elements in a vector. The latter thus can be plotted. please revisit the screenshot
Sum the vectors and vectorize ...
Maths Vectorize.sm (9.06 KiB)已下载 1204 次。
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
WroteJean Giraud, why do you add Line in the following code, I mean why not just type them separately or am I missing something?
Yes my friend, you are missing best using Smath feature,
1. the line | collects/instructs the project
2. the { collects for plotting
Visit attached Project PR EOS.sm
Here is your plot and cumulative.
Project PR EOS.sm (129.66 KiB)已下载 1183 次。
Thanks Jean. I myself am a chemical engineer & Equations of state example is very much appreciated!
mkraska, thanks for helping, but your file is created with a newer version of SMATh & throws error in my current version 0.98.6528
mkraska, thanks for helping, but your file is created with a newer version of SMATh & throws error in my current version 0.98.6528
Wrotemkraska, thanks for helping, but your file is created with a newer version of SMATh
You are right: Martin latest version throws error in my 6179.
I love Martin code ... Bingo !
The code I provided should work, as it did previous Smath 5346.
Wrote
I tested 3 programs to find the cumulative totals of a large array of 20820 elements.
The method of Sergio was incredibly fast, while other two methods were much slower.
Thanks Sergio.
Forgot to attach DATA file
Rainfal_Data.xlsx (486.31 KiB)已下载 800 次。
Cumulative Sum of a Large Matrix.sm (30.38 KiB)已下载 1176 次。


Look within!... The secret is inside you.
Best Regards
Eng. NDTM Amarasekera - Sri Lanka
1位用户喜欢此帖子
frapuano 2019/8/9 03:43:00
Hi Nugegodage. Try this other one.
Cumulative Sum of a Large Matrix.sm (25.32 KiB)已下载 1445 次。

(Notice that mi computer is very slow)
Best regards.
Alvaro
Cumulative Sum of a Large Matrix.sm (25.32 KiB)已下载 1445 次。

(Notice that mi computer is very slow)
Best regards.
Alvaro
3位用户喜欢此帖子
- 有新帖
- 无新帖



