[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Filtering the values of current and voltages based on a criteria
From: |
Ian McCallion |
Subject: |
Re: Filtering the values of current and voltages based on a criteria |
Date: |
Fri, 13 Mar 2020 09:03:00 +0000 |
On Fri, 13 Mar 2020 at 08:24, GK19 <address@hidden> wrote:
>
>
> The condition is w.r.t time
>
> A B C current voltage time
> .1 0.33 .99 1 1 1ns
> 0.2 0.34 .100 1 2 1ns
> 0.3 0.35 .101 1 3 1ns
> 0.4 0.36 .102 1 1 2ns
> 0.5 0.37 .103 2 3 2ns
> 0.6 0.38 .104 2 6 1ns
> 0.7 0.39 .105 2 8 3ns
> 0.8 0.40 .106 3 3 3ns
> 0.9 0.41 .107 3.5 3 3ns
>
> if i choose 1ns as the condition for time
> The output should look like
> Current = 1, 2
> Voltage = 1,2,3,6.
if m is the data and contains 6 columns as you show above and as many
rows as there are data points then
wantedrows = find(m(:,6)==1);
current = unique(m(wantedrows,4));
voltage = unique(m(wantedrows,5));
I have not tested this but hopefully it is close enough to get you started.
Cheers... Ian