How do I load a text file with 100 numbers (10x10) into a 10x10 array? And after doing this, how do I sort the absolute value of each row only (not the entire data set) from least to greatest?

댓글 수: 1

madhan ravi
madhan ravi 2020년 3월 21일
What have you tried? Use dlmread() or readmatrix() [if later version] and use abs() and sort().

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

답변 (1개)

Cris LaPierre
Cris LaPierre 2020년 3월 21일
편집: Cris LaPierre 2020년 3월 21일

0 개 추천

I suggest taking some time to go through MATLAB Oramp. It's a great way to familiarize yourself with MATLAB syntax. For example, Chapter 11 covers importing Data into MATLAB. Chapter 7 will show you how to use internal functions in your scripts and capture the outpus.

댓글 수: 1

Sara Coleman
Sara Coleman 2020년 3월 21일
Wow, I never knew about this great tool. I have been struggling with learning the syntax. I will check it out. Thanks!

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

카테고리

도움말 센터 및 File Exchange에서 Standard File Formats에 대해 자세히 알아보기

질문:

2020년 3월 21일

댓글:

2020년 3월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by