# Picking the right combination from the arrays

2 visualizzazioni (ultimi 30 giorni)
Ganesh Kini il 27 Mag 2020
Commentato: Ganesh Kini il 28 Mag 2020
I have 4 arrays, two combinations of Nwell and Pwell voltages of Transistor 1 and Transistor 2
For transistor 1
vnw_1 =
0.00000 0.90000
vpw_1 =
-1.8000 -1.2000
So we define as (Vn, Vp) as (0.00000, -1.8000) and another (0.90000, -1.2000) these are the combination respectively.
for transistor 2
vnw_2 =
0.90000 0.00000
vpw_2 =
-1.20000 0.20000
Similarly we have (Vn, Vp) as (0.90000, -1.2000) and another (0.00000, 0.20000)
we can see that (0.90000, -1.2000) is common in T1 and T2.
I want to get the common voltage as the output
How do i do that? There is nothing linked to the concepts of transistors, just i need that combination as the output. How do i do that? Please help me
##### 0 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti

Accedi per commentare.

### Risposta accettata

David Hill il 27 Mag 2020
Not sure how you are getting your data. Generally, you would not want to use so many variables but rather index into a single variable.
A=[vnw_1;vpw_1]';
B=[vnw_2;vpw_2]';
C=A(ismember(A,B,'rows'),:);
##### 8 CommentiMostra 6 commenti meno recentiNascondi 6 commenti meno recenti
Rik il 28 Mag 2020
Ganesh Kini il 28 Mag 2020
@Rik Just wanted to know different approaches to solve the issue.
Thanks for the help it works fine

Accedi per commentare.

### Categorie

Scopri di più su Data Type Conversion in Help Center e File Exchange

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by