필터 지우기
필터 지우기

how can I convert and gather vectors into one matrix

조회 수: 1 (최근 30일)
MAHMOUD ALZIOUD
MAHMOUD ALZIOUD 2017년 9월 27일
편집: Walter Roberson 2017년 9월 27일
Dear All;
I have some vectors that i imported from a text file, MATLAB imported them as separate columns or vectors, they were string vectors and i converted them into numbers using the code:
Ans_10=str2num(Total_Volume)
as an example.
now i have like 25 vectors or columns, how can i please gather 22 of them into one new matrix?
  댓글 수: 2
Stephen23
Stephen23 2017년 9월 27일
편집: Stephen23 2017년 9월 27일
Fix the problem by importing that data properly, not by messing around with str2num and "gathering" vectors. MATLAB has many useful functions and tools for importing numeric data that do not require pointlessly trying to convert string values and merge vectors. When you simply edit your question and upload some sample data by clicking the paperclip button then we can show you much better ways to import your data.
Oh, and magically trying to join 22 vectors together is definitely not a good way to write code:
MAHMOUD ALZIOUD
MAHMOUD ALZIOUD 2017년 9월 27일
Thank you very much, I will take this answer into consideration and i will try to import the data again into array or matrix. thank you Steph

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by