t_struct

5 Reputation

One Badge

10 years, 78 days

MaplePrimes Activity


These are questions asked by t_struct

 

My problem is the following; Let's say that I want to make a simple program of designing of a steel beam. In order to do so, there is a respectable number of parameters that have to be taken into account - forces, geometrical characteristics etc -. So for example, I have an excel file that has the following rows

1) A row of variables  :                          LENGTH   MOMENT_OF_INERTIA   AXIAL_FORCE    HEIGHT_OF_SECTION
 
2)A row of a value for each one variable :      5                556                       130                       300


the traditional approach in maple to intoduce these values to the program would be:

LENGTH:=5
MOMENT_OF_INERTIA:=556
AXIAL_FORCE:=130                etc etc

and then when for example we write

MOMENT_OF_INERTIA/LENGTH       we get

556/5=111.2

..but for problems like this the variables may be 50 in number, even more.. and it would be very timeconsuming to define all these parameters one by one..
so what I have been looking for so much these days is a predefined maple procedure - if there is one.. - that takes a matrix which we have created in advance and that includes all the names of the variables that we want to have in the problem - let's name it VARIABLES - takes as well a matrix that we also have created in advance and includes the value that we want each of our variables to get in the problem - let's name it VALUES - and make the correspondense automatically, so as to when we introduce an epression in maple thereafter, like     MOMENT_OF_INERTIA/LENGTH, when we press enter to get  556/5=111.2  (and not just a reproducing of what we already wrote , MOMENT_OF_INERTIA/LENGTH ..).. Do you think that there is an easy way to do so??

many thanks in advance!

Page 1 of 1