convert data into matrix

8 ビュー (過去 30 日間)
Raneem Alshair
Raneem Alshair 2020 年 3 月 2 日
コメント済み: dpb 2020 年 3 月 4 日
i have a data in notepad file (data is many numbers in many rows and columns) ,, how i can read it as a matrix 2x2 only using matlab code ?
  6 件のコメント
Walter Roberson
Walter Roberson 2020 年 3 月 2 日
You cannot do that. The information you need for the 2 x 2 output that you expect, is not contained in the input file.
dpb
dpb 2020 年 3 月 2 日
編集済み: dpb 2020 年 3 月 3 日
In fact, what is in the data file is the frequency trace from the analyzer for the eight signals; what was derived from that isn't in the file.
There may be some other way the instrument can download what you're looking for, but this wasn't it.
ADDENDUM:
Or maybe there was another file created and you've just opened the wrong one???

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

回答 (1 件)

Image Analyst
Image Analyst 2020 年 3 月 3 日
Try
data = csvread(filename, 1, 1) % old MATLAB
or
data = readmatrix(filename, 'numHeaderLInes', 1); % new MATLAB
  5 件のコメント
Walter Roberson
Walter Roberson 2020 年 3 月 4 日
Sigh, looks like what I thought was a 5 is really an S. The desired output was being shown in a pattern, whereas I was reading the desired output as being actual values such as 521
dpb
dpb 2020 年 3 月 4 日
Ah! I had an advantage in knowing what he was talking about when he made the first followup to confirm what I first suspected. He's looking for what will be a complex array for each of the four elements represented symbolically in the image...but that's not the data in the file he has there; those appear to be the individual trace amplitudes by frequency w/o the phase information (PSDs roughly).

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

カテゴリ

Help Center および File ExchangeLaTeX についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by