필터 지우기
필터 지우기

Importing Data outputted by FreeFem++

조회 수: 3 (최근 30일)
Christopher Hall
Christopher Hall 2015년 3월 9일
댓글: Christopher Hall 2015년 3월 9일
Hi, I am trying to import some data from an FEA code I am currently learning to use. The data itself represents scalar u components of velocity and is outputted along 5 columns and then a new row is formed and it continues to write.
e.g
n1 , n2, n3, n4, n5
n6 , n7, n8, n9, n10 ......
I want to import the data into 1 column with the data in order.
n1
n2
n3
n4
n5
n6
..
Can anyone point me to the correct function and/or method that I need to use to do this.
Many Thanks Chris

채택된 답변

Giorgos Papakonstantinou
Giorgos Papakonstantinou 2015년 3월 9일
편집: Giorgos Papakonstantinou 2015년 3월 9일
u = [1 2 3 4 5;
6 7 8 9 10;
11 12 13 14 15];
reshape(permute(u,[2 1]), [], 1)
or more compact:
u = u.';
u = u(:);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Classification에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by