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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Programing Matlab to Mathcad Function Find

JB_9681141
4-Participant

Programing Matlab to Mathcad Function Find

Hi, I´m translating some matlab codes to mathcad  and I have had problems with the function Find.

Matab:

Vs30= Value

Vlin= Vector 23x1

idx = find(Vs30 < V_lin);

 

In Mathcad it says that idx is undefined.

 

JB_9681141_1-1605041470138.png

 

It should return a vector 23x1

 

Please help me, Thank u !

 

ACCEPTED SOLUTION

Accepted Solutions

That would be   match

Fred_Kohlhepp_0-1605067172733.png

 

 

View solution in original post

4 REPLIES 4

The command "Find" in Mathcad is the end of a specific construction, a solve block.  It's not clear what you're trying to do.  If you want a 23 element vector, all V30 value, I'd do it this way:

Fred_Kohlhepp_0-1605043581318.png

 

I need this function 

 

find(X) returns a vector containing the linear indices of each nonzero element in array X  but in Mathcad

That would be   match

Fred_Kohlhepp_0-1605067172733.png

 

 

Just to add a small point to Fred's reply: note that indexing in Mathcad starts at 0 by default, though this can be changed using  ORIGIN = 1 to match MATLAB's starting index.

 

Alan

Announcements

Top Tags