Skip to main content
12-Amethyst
Jan 24, 2025 12:01 AM UTC
Question

unique feature without advanced features

DM_10631844_0-1737676527364.png

DM_10631844_0-1737679586834.png

 

I want an algorithm that generates the function [a,b,c}=unique(Y) although there are forums what I need is for it to be only with structural control sequences if else for while etc but not advanced functions of either Matlab or from mathcad since when you want to replicate the function elsewhere it is complicated, it would be appreciated if you have a way to do it 

 
DM_10631844_0-1737687596060.png

What would the mathcad programming of this algorithm be like as it is in the image so it is easier to carry out the function?

 

2 replies

JeffH1
16-Pearl
Mar 20, 2026 11:10 PM UTC

This is a year old but...

 

What you posted is very C-like, and could easily convert this to a Custom Function DLL and simply add this to the Custom Functions folder for use.  There are examples of how to do this in the help. Of course, you need a C/C++ compiler.

Translate
JeffH1
16-Pearl
Mar 21, 2026 2:04 PM UTC

Actually, it's easier than what I posted.  See this discussion here on unique functions: Yet another "unique" function and the NaN (Not a "... - PTC Community

Translate