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

8 vues (au cours des 30 derniers jours)
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);

Réponse acceptée

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

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by