I have one text file "123.txt" which contains around 1000 numbers in one column.
1.234560000
0.345678700
2.090909909
4.568696844
etc...
I want to import this into matlab. and after that want to convert that into binary numbers(I have a code for that).
can anyone suggest me how to import or read from notepad .txt file..???

 採用された回答

Grzegorz Knor
Grzegorz Knor 2011 年 10 月 10 日

0 投票

doc importdata
doc load
doc fread
...

3 件のコメント

Walter Roberson
Walter Roberson 2011 年 10 月 10 日
fopen(), textscan()
Parth PAtel
Parth PAtel 2011 年 10 月 21 日
After getting values from Import data,I am storing that value in variable A.
I want to read each value one by one, process it and than store all the values in the module.
If I use for loop like
For i 1:1:1000;
{
K(i)=A(i)+1;
}
It shows an error of Size mismatch.
How can I define size of variable K?
OR
ANy other way to READ,Process and STORE value one by one..???
Thanks in advance
Image Analyst
Image Analyst 2011 年 10 月 21 日
Don't use braces with for loops - this isn't C.
Do this in one line - no for loop needed:
K = A + 1;

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Large Files and Big Data についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by