cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Programming help

Marcin
1-Visitor

Programming help

Hello

I am begginer with programing and I need to writh all these formulas in excel file

Can somebody explain how this program works (see attached picture)

Many thanks

Marcin

7 REPLIES 7
VladimirN
24-Ruby II
(To:Marcin)

Hello,

But why Excel ?

I have created spreadsheet to calculate bearing capacity based on mathcad calculation, I have choose the excel because it is easy to use and everybody in the office can use it as well but unfortunately I do not know how to translate to excel this particular program from mathcad

Next stage is going to be a proper .exe program based on excel spreadsheet


Mathcad is easy to use. Why don't you set the calculations up so so everybody in the office only has to change the inputs?

Mike

I do agree, it is easy to use (except programing )

We have got only one licence so it was easier to create excel spreadsheet.

Coming back to the program I have attached - does anybody has got similar program so I can work it out how it works

Thanks

Marcin

RichardJ
19-Tanzanite
(To:Marcin)

I do agree, it is easy to use (except programing )

I think I can say with a high degree of confidence that programming that in Excel is going to be much harder than programming it in Mathcad. Excel was designed for doing simple arithmetic on tables of numbers. For that, it's very good. For complex engineering calculations, IMHO it's grossly inadequate.

R is a matrix, with the elements defined as shown. The ORIGIN for the worksheet has obviously been set to 1, so BCD with the subscript 1 refers to the first element of BCD. The T on the matrix means transpose, so the columns and rows are switched.

Then the program just loops to calculate three results.

For the calculation of tau, <i> is the column operator, so it's taking the ith column of R. The summations should be clear enough, except that in the denominator that arrow means vectorize, so the calculation is done element by element (so it's the sum of 1 over each element of R)

The root function finds the value of x where the expression shown crosses zero.

The final expression that calculates the value of f should be clear enough.

I have no idea how to implement the functions K and E in Excel. You can create a function in Excel by programming it using VBA. How to implement the numerical integration in VBA though?

StuartBruff
23-Emerald III
(To:RichardJ)

Richard Jackson wrote:

I do agree, it is easy to use (except programing )

I think I can say with a high degree of confidence that programming that in Excel is going to be much harder than programming it in Mathcad. Excel was designed for doing simple arithmetic on tables of numbers. For that, it's very good. For complex engineering calculations, IMHO it's grossly inadequate.

Seconded. ... Thirded, Fourthed, etced.

However, I've come across this argument many times. The arguments always seems to run around the fact that "everybody has Excel", often ignoring the fact that Excel is not free (but that's kind of a red herring as there are uses for Excel and it's probably cheaper overall (purchase cost, support costs, maintainability) to get the whole Office package for everybody). However, it is likely to be significantly cheaper in both cost and timescale to get a set of floating Mathcad licences when faced with situations like this - the time spent in doing the conversion and validating it (not to mention any QA and configuration control overheads) may well exceed the cost of a Mathcad licence. Modification, re-use etc will also be significantly easier.

I have no idea how to implement the functions K and E in Excel. You can create a function in Excel by programming it using VBA. How to implement the numerical integration in VBA though?

They could be also be implemented using normal spreadsheet techniques to perform a basic numerical integration (see bottom of attached worksheet for a crude (non-spreadsheet) example of the technique using the midpoint rule).

Stuart

The answer is simple -

  1. Everybody at the office has got Microsoft office package, including excel
  2. The calculation I am preparing is going to be use by few sales men
  3. In this case floating mathcad licence will be more expensive than my time + training for few people also they will never use mathcad for anything else
  4. In the case when they are not happy with the excel spread sheet I will create .exe program using VBA or C++

Thanks for your replay; I will review the attachment shortly

Many thanks

Marcin

Announcements

Top Tags