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

3 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Multidimensional Arrays 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by