# Picking up the correct index values

조회 수: 3(최근 30일)
Ganesh Kini 27 May 2020
댓글: Ganesh Kini 28 May 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

댓글을 달려면 로그인하십시오.

### 채택된 답변

Rik 27 May 2020
You should probably rethink the way you store these values, because this is much more difficult to index than it needs to be.
vnw_1 = [ 0.00000 0.90000];
vpw_1 = [-1.80000 -1.20000];
vnw_2 = [ 0.90000 0.00000];
vpw_2 = [-1.20000 0.20000];
for T1_ind=1:2
T1=[vnw_1(T1_ind) vpw_1(T1_ind)];
for T2_ind=1:2
T2=[vnw_2(T2_ind) vpw_2(T2_ind)];
if isequal(T1,T2)
end
end
end
##### 댓글 수: 9표시숨기기 이전 댓글 수: 8
Ganesh Kini 28 May 2020
Thanks for the help it works fine

댓글을 달려면 로그인하십시오.

### Community Treasure Hunt

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

Start Hunting!