Filter löschen
Filter löschen

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

3 Ansichten (letzte 30 Tage)
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 Kommentar
Jonathan Ashley
Jonathan Ashley am 2 Dez. 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

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by