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

1 回表示 (過去 30 日間)
Jonathan Ashley
Jonathan Ashley 2022 年 12 月 2 日
コメント済み: Jonathan Ashley 2022 年 12 月 2 日
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 件のコメント
Jonathan Ashley
Jonathan Ashley 2022 年 12 月 2 日
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

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeMultidimensional Arrays についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by