필터 지우기
필터 지우기

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