how to create a matrix in matlab?

3 visualizaciones (últimos 30 días)
ankanna
ankanna el 16 de Mzo. de 2021
Comentada: ankanna el 20 de Abr. de 2021
L12 L13 L23
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
how to create a matrix

Respuesta aceptada

Veronica Taurino
Veronica Taurino el 16 de Mzo. de 2021
Editada: Veronica Taurino el 16 de Mzo. de 2021
Your question is not clear. If you have those 3 arrays:
L12 = [0 0 0 0 1 1 1 1];
L13 = [0 0 1 1 0 0 1 1];
L23 = [0 1 0 1 0 1 0 1];
Matrix = [ L12; L13; L23]
or
Matrix = [ L12; L13; L23 ]'
depending or your needs

Más respuestas (2)

Stephen23
Stephen23 el 16 de Mzo. de 2021
M = dec2bin(0:7)-'0'
M = 8×3
0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1

Walter Roberson
Walter Roberson el 16 de Mzo. de 2021
[L23, L13, L12] = ndgrid(0:1);
L12 = L12(:); L13 = L13(:); L23 = L23(:);
table(L12, L13, L23)
ans = 8×3 table
L12 L13 L23 ___ ___ ___ 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1
  15 comentarios
Walter Roberson
Walter Roberson el 11 de Abr. de 2021
That code will never do what you want it to do, and it cannot be fixed.
Your source is a paper that is wrong. You need to get corrections from the authors of the paper.
ankanna
ankanna el 20 de Abr. de 2021
node = 3; ri=0.9;
L=(node*(node-1))/2;
configuration = dec2bin(0:(2^L-1))-'0';
alfak=configuration;
source node=1; destination node=3;
m = Limit on intermediate node;
2TR(alfak) == ri^m;
how to calculate two terminal reliability.
alfak Path 2TR(alfak)
1 r1r3 0.81
2 r1r3 0.81
3 r1r2r3 0.729
4 r1r3 0.81
5 None 0.00
6 r1r3 0.81
7 None 0.00
8 None 0.00
please help me to generate above and i want that 2terminal reliability at output.

Iniciar sesión para comentar.

Productos


Versión

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by