plotting without signal(.csv) file being hard coded

3 vues (au cours des 30 derniers jours)
vsee
vsee le 23 Août 2011
Hello
I am trying to plot a huge signal to do some time analysis. Here's a piece of my code.
asig = csvread('tek0001CH1.csv',15,0);% input signal from matlab workspace
%tim =sig(1:1000000,1);
aamp = asig(1:5000000,2);%vary this to get more samples
ts = asig(2,1) - asig(1,1);%sampling rate calculated automatically
tim = [0:5000000 - 1]*ts;%vary this in accordance with aamp
time = tim';%transposed to get a column vactor for plotting
ax1 = subplot(2,1,1);plot(time, aamp);
xlabel('time');
ylabel('amplitude(volts)');
grid;
axis([0 max(tim) -0.1 1.9]);
If I have to change my input signal, I have to change it every time since its hard coded. Is it possible to have an interface where the user selects an input signal from the hard drive or an external interface(usb drive)each time the program runs?
Thanks

Réponses (1)

vsee
vsee le 23 Août 2011
I was eventually able to do this with uigetfile. I wonder if there are other ways
  1 commentaire
Fangjun Jiang
Fangjun Jiang le 23 Août 2011
That's probably the best way based on your task.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Continuous Wavelet Transforms dans Help Center et File Exchange

Tags

Aucun tag saisi pour le moment.

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by