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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Loop Function Issue

isharma
1-Newbie

Loop Function Issue

As I am trying to solve one problem for my project, I am facing difficulties to solve the loop.

I am looking for Buckling Pressure for different L.b and K value.

Can you please help me out.

4 REPLIES 4

Couple things:

  1. A range variable is NOT a vector; it cannot be addressed by an index.  There is an "undocumented feature" that if you follow the definition with an evaluation directly, it becomes a vector.  I DO NOT LIKE OR RECOMMEND THIS.  But I have employed it in the attached file.
  2. the indices in the loop were not correct.  And it didn't need to be vectorized.

Thank you for your kind response.

I was trying to make a loop function after your modification.

Without loop function, I am getting the answer where as same formula with loop function not giving me the result

Can you look into it.

The error message is one of the few that actually has a valid meaning:  the units in your equation don't balance, the first term is energy, the second is force.  When I correct the formula (to agree with "Model"):

Fred already pointed you to the two culprits.

Here is a utility routine to create a vector using the same arguments (first, second last) as used in creating the range and a way to avoid invalid indices in the creation of P.

Top Tags