Making Vector Elements Cumulative - Adding Vector Elements down the column - Сообщения
#1 Опубликовано: 23.04.2018 14:20:34
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 КиБ) скачан 41 раз(а).

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 КиБ) скачан 41 раз(а).
#2 Опубликовано: 23.04.2018 14:47:10
#3 Опубликовано: 23.04.2018 15:03:49
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
#4 Опубликовано: 23.04.2018 15:37:46
[albumimg]1481[/albumimg]
sergio
sergio
1 пользователям понравился этот пост
NDTM Amarasekera 09.08.2019 03:20:00
#5 Опубликовано: 23.04.2018 15:59:45
Sum the vectors and vectorize ...
#6 Опубликовано: 23.04.2018 16:48:03
#7 Опубликовано: 23.04.2018 16:56:06
Maths Vectorize.sm (9 КиБ) скачан 73 раз(а).
#8 Опубликовано: 23.04.2018 16:56:33
Thank you PompelmoTell
#9 Опубликовано: 23.04.2018 17:01:59
#10 Опубликовано: 23.04.2018 17:13:07
#11 Опубликовано: 23.04.2018 20:27:53
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#12 Опубликовано: 23.04.2018 21:47:19
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 КиБ) скачан 49 раз(а).
#13 Опубликовано: 23.04.2018 22:08:11
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
#14 Опубликовано: 24.04.2018 00:11:37
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.
#15 Опубликовано: 24.04.2018 00:28:22
#16 Опубликовано: 09.08.2019 03:16:20
Wrote[albumimg]1481[/albumimg]
sergio
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 раз(а).
Cumulative Sum of a Large Matrix.sm (30 КиБ) скачан 45 раз(а).
Look within!... The secret is inside you.
Best Regards
Eng. NDTM Amarasekera - Sri Lanka
1 пользователям понравился этот пост
frapuano 09.08.2019 03:43:00
#17 Опубликовано: 09.08.2019 05:38:20
Hi Nugegodage. Try this other one.
Cumulative Sum of a Large Matrix.sm (25 КиБ) скачан 38 раз(а).

(Notice that mi computer is very slow)
Best regards.
Alvaro
Cumulative Sum of a Large Matrix.sm (25 КиБ) скачан 38 раз(а).
(Notice that mi computer is very slow)
Best regards.
Alvaro
3 пользователям понравился этот пост
#18 Опубликовано: 09.08.2019 11:33:32
#19 Опубликовано: 09.08.2019 13:31:37
#20 Опубликовано: 09.08.2019 19:12:35
-
Новые сообщения
-
Нет новых сообщений