i would like to evaluate an imported matrix from excel. My Prime 3.0 sheet is attached.
Basically what I have:
I create a lookup table in mathcad where every row represents a component, in this case a MOSFET.
Every column represents the corresponding parameters of the component.
I can evaluate row by row with any equation.
By doing this I can obtain for example as a result an array, for example an array with the calculated losses for each MOSFET. So far so good.
What I need:
Now I need some kind of programming or searching command in mathcad, where I can find all the indicies of lets say an for which a special searching condition = true.
For example my result array:
Losses = [100mW, 100mW, 70mW, 80mW, 100mW]
The goal is to find all indizies where Losses < 100mW = true .
Now the imported excel matrix can be quite large and confusing.
With the indizies, which were obtained before, I want to edit the imported excel matrix, that ONLY the corresponding rows are shown in a new matrix / array...
In other words: The imported matrix may have 95% trash values which are not suited for a given searching condition. Only a small amount of rows is interesting and shall be displayed in a new matrix.
I have a couple of comments on your program. It is not clear how you reading in the Excel worksheet. I would recommend using the READEXCEL function. The function will automatically fill empty cells with NaN. There is also an option to have an alternate value. The READEXCEL stops when it gets to an empty row, unless instructed otherwise.
Think about using the "lookup" functions to find values of interest. There is an option for less than.
Cheers and I hope this helps.
The command you're looking for is "match".
match will return the indices of all of the rows that satisfy the qualifier (in this case "less than or equal to".) My Prime 6.0 Express will not help you with 3.0.
Would this help?
The "match" command finds the indices of all values in P.loss which do NOT meet the given condition (which are greater than 100 mW) and then "trim" deletes the corresponding rows in matrix A.