How can I divide the output's each value in the x-axis by 1.16*10^6

5 ビュー (過去 30 日間)
Annonymous User
Annonymous User 2015 年 10 月 9 日
コメント済み: Walter Roberson 2015 年 10 月 12 日
clear
[filename, pathname] = uigetfile('*.raw;*.prc', 'Pick raw or processed data file');
N=str2double(filename(5:6));
% load processed file
fid = fopen([pathname filename],'r','b');
A= fread(fid,inf,'*single')';
prcdata=reshape(A,N,[])';
plot(prcdata)
end
title(strrep(filename,'_','-'))
fclose(fid);
%%|
I also tried the following steps
prcdata=reshape(A,N,[])/(1.16*10^6);

採用された回答

Walter Roberson
Walter Roberson 2015 年 10 月 9 日
plot((1:size(prcdata,1))./1.16E6, prcdata)
You were changing the y values, but you want to change the x values.
  3 件のコメント
Annonymous User
Annonymous User 2015 年 10 月 11 日
is there a way by which I can save that output graph to like an excel sheet or something?
Walter Roberson
Walter Roberson 2015 年 10 月 12 日
x = (1:size(prcdata,1))./1.16E6;
y = prcdata;
xy = [x(:), y(:)];
xlswrite('YourFile.xls', xy);

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by