Problem with modelling triangle

1 view (last 30 days)
Tim
Tim on 1 Sep 2014
Commented: Tim on 1 Sep 2014
Hi,
I am trying to model a triangle in a square cell based on its dimension. However, I have some problem with parts of the code, I think it might be the logic behind my programming or over definition with the code itself.
I have attached the code. The problem lies with the second half of the triangle. I have also attached the basis of my analysis. The problem lies between -s/2 to s/2 of the code. Any hints about the wrong logic of my code or over definition will be appreciated. The cell is a square dimension with 2r1 x 2r1 dimension
  2 Comments
Star Strider
Star Strider on 1 Sep 2014
I quickly got lost in your code.
This is obviously more than an equilateral triangle with an ‘s’ parameter. Are you doing finite element analysis or finite element modeling of some sort?
Please go into a bit more detail as to what you want to do and what the problems are.
Tim
Tim on 1 Sep 2014
Hi,
yes, the triangle is equilateral with its centroid coinciding with the centre of the square cell. for the code, s is L_triangle. i have attached an image of what went wrong. There is something with Y(jj)<0. image of the triangle

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!