Proektsoftbg / Calcpad

Free and open source software for mathematical and engineering calculations.
https://calcpad.eu
MIT License
343 stars 42 forks source link

will Calcpad support file reading and wrting in the future #100

Open idealkindom opened 1 year ago

idealkindom commented 1 year ago

Reading ang writing data file is very useful, hoping Calcpad could do this in the future.

Proektsoftbg commented 1 year ago

Yes, but after we add vectors and matrices. :) We need to have where to store the data. What we can do quickly is to add an "Import from Excel" command. Calcpad will read the cells and insert the contents into rows, warped in take functions:

R1(j) = take(j; A1; B1; C1...)
R2(j) = take(j; A2; B2; C2...)
R3(j) = take(j; A3; B3; C3...)
M(i;j) = take(j; R1(j) ; R2(j) ; R3(j) ...)

Then you will be able to use the data as matrix. We can even make this interactive - to open the spreadsheet and ask the user to select a cell range.

idealkindom commented 1 year ago

Yes, but after we add vectors and matrices. :) We need to have where to store the data. What we can do quickly is to add an "Import from Excel" command. Calcpad will read the cells and insert the contents into rows, warped in take functions:

R1(j) = take(j; A1; B1; C1...)
R2(j) = take(j; A2; B2; C2...)
R3(j) = take(j; A3; B3; C3...)
M(i;j) = take(j; R1(j) ; R2(j) ; R3(j) ...)

Then you will be able to use the data as matrix. We can even make this interactive - to open the spreadsheet and ask the user to select a cell range.

Hi, Ned. I don't have knowledge and skills on systematic programming, instead I used Maxima and GNU Octave for many years on engineering calculation.

I'm wondering is it possilbe to learn to contribute to the development of Calcpad. Would you please give me some suggestions how to pick up? it would be very kind of you if some tutorials for development could be advised. I think another important need for Calcpad is to improve the function of plot, i.e. mutiplot with label, legend , line style and symbol.Also,Though map is very good, 3d plot is still attractive.

Proektsoftbg commented 1 year ago

Hi, Thank you! I will consider this.

About plotting, it is very good that Calcpad is Html based. It will allow us to use some ready made opens source JS plot library, like this one: https://plotly.com/javascript/

What we can do is simply to reference the library in our header and export the data to it, instead of generating an image. In this way, we can add rich formatting and interactive experience to our plots without much efforts.

hildebrandopsj commented 1 year ago

Yes, but after we add vectors and matrices. :) We need to have where to store the data. What we can do quickly is to add an "Import from Excel" command. Calcpad will read the cells and insert the contents into rows, warped in take functions:

R1(j) = take(j; A1; B1; C1...)
R2(j) = take(j; A2; B2; C2...)
R3(j) = take(j; A3; B3; C3...)
M(i;j) = take(j; R1(j) ; R2(j) ; R3(j) ...)

Then you will be able to use the data as matrix. We can even make this interactive - to open the spreadsheet and ask the user to select a cell range.

Interact with excel will be amazing! I can see Calcpad working side by side with SAP2000 ;)

Proektsoftbg commented 1 year ago

I tried to create a macro function for 3D plotting with Plotly. The result is not so bad, but works slow and throws some script errors sometimes. I will continue to experiment further and when ready, I will post the solution. Maybe, we can create a macro library that can be used like follows:

#include Plot.cpd
Plot3D$(name$; function$; width$; height$)

image The new "macros" and "modules" features in Calcpad provide unlimited possibilites to extend its functionality. :)

idealkindom commented 1 year ago

I tried to create a macro function for 3D plotting with Plotly. The result is not so bad, but works slow and throws some script errors sometimes. I will continue to experiment further and when ready, I will post the solution. Maybe, we can create a macro library that can be used like follows:

#include Plot.cpd
Plot3D$(name$; function$; width$; height$)

image The new "macros" and "modules" features in Calcpad provide unlimited possibilites to extend its functionality. :)

Though I think this only works with Calcpad having a connection to the internet.It looks pretty good considering you made this happen in such a short time.I am lookinig forward to a new verision to release.By the way,Calcpad got a rising star label for number of download on sourceforge.

Proektsoftbg commented 1 year ago

Yes, currently it requires internet to work, but after we select the appropriate platform and implement the macro interface, we can download the library as local files and add it to the Calcpad setup.