## 149 Reputation

13 years, 115 days

## debug...

joe riel, i wrote the code exactly as you said.. that didnt work

I looked into the debugging help page but this seriously confused me. so i opted for copying and pasting line by line to another work sheet and running it after each line.

i found that if my code looks like this

>x := something

> b:= something

>c := x * b

>

> d := x * b

maple finds the blank space on line  4 as an invalid object

if there is an extra space in the code for example x(space) :=something  ... it is wrong

x:=(space)something.. it is wrong

I also found the errors pointed out by robert.

Thank you for helping

## for some iteration.. there...

for some iteration.. there may not be an intersect.. so i have to write something to account for that.

but for those which do have an intersect, i need an approxiate value..

## complex...

hey joe, thanks for helping.  I cannot have complex values because these are used to calculate areas. is there any way i could get maple to approximate this solution?

## oops...

the post came out with some unexpected text... but still makes sense

## complex roots...

is there any way i could solve the 'complex roots' problem? can maple approximate them?

by the way, the algorithm is to be used for slope stability calcs. eq1, eq2 and eq3 represent the land profile. the circle represents a circular slip plane. cdash and uniweight are soil parameters.  The algorithm is meant to analyse the stability for diffent slip plane(this is why i am varying h,k and r) and calculate the factor of safety (fos) then print out the value of the lowest factor of safety along with h,k and r... which represent the least safe slip plane.

here is the file. it would be good if 'for k...' to 'end do' could be made to behave as one block.  the purpose of the algorithm is to variate h,k and r and to calculate 'fos' for each set.  the value of the mimimun fos and its corresponding h,k and r need to be output.    thanks for helping

## clarification...

ok so I have the 75 or so commands on a maple worksheet.

To create the loop, i have to add the 'for' statements at the top and the 'end do' s at the bottom but once im done with the 'for' statements and go to the bottom, maple tells me the 'for' statements are wrong(because they should finish with 'end do').

Even after I add the 'end do's at the bottom, maple does not see the link between the 'for's at the top and the 'end do's at the bottom. It treats them separately and therefore reports all of them as wrong statements. this is basically my problem.

also, i find it extremely hard to add statements between others.. say i click the space between statement 1 and 2, its only if im really lucky that it places the cursor there for me to write something. If I go on statement 1 and press enter, the cursor goes to the value calculated by statement 1, and when i press enter again, the cursor goes to statement 2... does not allow me to add anything in between. Is there something i should be doing here?

cheers

Nash

## it worked!...

evalf worked. thanks!

## thanks...

thanks a lot mate.

## thanks...

the algorithm works! thanks a lot

```
```
 Page 1 of 1
﻿