Borrar filtros
Borrar filtros

Creating two matrixes that show the displacements that are known and unknown

3 visualizaciones (últimos 30 días)
Hi, I'm fairly new to coding and I need help with writing a code that automatically creates 2 matrices using input data.
This is the direction im heading in. I'm trying to use an if loop in side of a for loop to go into my MSUP matrix and create an unknown and known displacement matrices
for AA=1:size(MSUP,1)
if MSUP(AA,2)
unknown_displacements=[]; %%
known_displacements=[]; % (1xNR)
endfor
The end result should look like this
unknown_displacements=[6 7 8];
known_displacements=[1 2 3 4 5];
  1 comentario
Jonathan Ashley
Jonathan Ashley el 2 de Dic. de 2022
my MSUP looks like this
MSUP=[1 1 1; 3 0 1; 4 0 1]
I need it to go into the MSUP matrix look 1st row tell if (1,2) and (1,3) are 1 or 0. If 1 i need it to add a column to the known displacements matrix and if 0 add it to the unknown matrix
I apologize if this is confusing 1st time posting here

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Multidimensional Arrays en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by