electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

need help in MATLAB ( how to convert in microvolt)


Post new topic  Reply to topic    EDAboard.com Forum Index -> Digital Signal Processing -> need help in MATLAB ( how to convert in microvolt)
Author Message
vjfaisal



Joined: 24 Sep 2006
Posts: 264
Location: pakistan


Post26 Jun 2007 22:12   

convert microvolts to db


hi
i have got a problem in converting my Y-axis in microvolts.
As i have use, the normaized frquency (Along X-axis ) and measure voltage along (Y-Axis), i have normalized my both Axis, now i wnt to be my Y-Axis normalizes range be in MICRO VOLTS.

so please write the code which help me to convert my Yaxis to MICRO VOLTS
Back to top
brmadhukar



Joined: 21 Jun 2002
Posts: 844
Helped: 29


Post27 Jun 2007 10:50   

microvolt on matlab figures


use

axis([-inf inf MINValue MAXValue])

the values should be in uVs.

The other option should be to divide your Y axis values by 1e-6.

BRM
Back to top
vjfaisal



Joined: 24 Sep 2006
Posts: 264
Location: pakistan


Post27 Jun 2007 20:51   

why convert in microvolts


I m using the data for my BCI project ,from the website, so i donot know that Yaxis of my FFT is is in VOLTS or MICROVOLTS.

1) How should i know about that ???????????(abt my axis information)

2) In matlab, how the softeware knows that the data i m giving to it has voltage in microvolts alog Yaxis, so is it correct to set the matlab software by us to tell that Yaxis has the followinfg microvolts along Yaxis. ( tell about procedure, correct or not)
Back to top
brmadhukar



Joined: 21 Jun 2002
Posts: 844
Helped: 29


Post28 Jun 2007 5:39   

convert db to microvolt


1) you look at the data -- you should know whether it is in volts aor any other units.

2) Matlab has no way knowing what is the format -- unless you tell it.

BRM
Back to top
vjfaisal



Joined: 24 Sep 2006
Posts: 264
Location: pakistan


Post28 Jun 2007 6:26   

convert microvolt to hertz


how i percieve that the data in volts or in microvolts, becoz after converting it into DB , it gives normalize values in the range (70 to -80 or above ),what it give name to these values.

Is it correct or i have to correct direct in to uV rather than in db


REGARDS
Back to top
echo47



Joined: 07 Apr 2002
Posts: 4206
Helped: 566


Post28 Jun 2007 6:37   

need help in MATLAB ( how to convert in microvolt)


Can you show us some example data? That would help us to understand your question.

uV is microvolts, dB is dimensionless. They are incompatible.
Maybe you meant dBV or dBuV (decibels relative to one volt, or decibels relative to one microvolt).

Where is the BCI project website?
Back to top
Google
AdSense
Google Adsense




Post28 Jun 2007 6:37   

Ads




Back to top
vjfaisal



Joined: 24 Sep 2006
Posts: 264
Location: pakistan


Post28 Jun 2007 23:08   

Re: need help in MATLAB ( how to convert in microvolt)


hi,
this is hte data i m calling in matlab , this is EEG data
please use this data and try to achieve these results, i very badly need these results.

1) Y-axis should be in (uVolts)

2) normalizes Xaxis ,in frquency(Hz)

3) Use any filter tecnique best to pass frequencies between 12-19 hz. Use pass band, stop band of ur own for best results

Please apply this and upload the matlab code....
best regards

Added after 5 minutes:

hi echo47,

please giv me u r e-mail address, so i will mail u the EEG data , it is not uploaded here



regads
Back to top
echo47



Joined: 07 Apr 2002
Posts: 4206
Helped: 566


Post29 Jun 2007 1:28   

need help in MATLAB ( how to convert in microvolt)


Hi vjfaisal,

Instead of email, how about simply attaching a ZIP file containing the data file to your message? That way, everyone can see it and help you. Please try to keep the attachment under 200 kilobytes.

If the data contains several columns of numbers, please explain what they mean.
Back to top
vjfaisal



Joined: 24 Sep 2006
Posts: 264
Location: pakistan


Post29 Jun 2007 23:07   

Re: need help in MATLAB ( how to convert in microvolt)


here is the data


Sorry, but you need login in to view this attachment

Back to top
vjfaisal



Joined: 24 Sep 2006
Posts: 264
Location: pakistan


Post29 Jun 2007 23:08   

Re: need help in MATLAB ( how to convert in microvolt)


please reply soon with results


best regards
Back to top
echo47



Joined: 07 Apr 2002
Posts: 4206
Helped: 566


Post30 Jun 2007 1:01   

need help in MATLAB ( how to convert in microvolt)


I see two files of numbers. What do the values represent? Hertz? Microvolts?

I'm guessing that the data is time-sampled. What is the sample rate? Need to know that before filtering.

Please explain more clearly what you want to display in dB. dB is a ratio. dB relative to what?

Do you have MATLAB's Signal Processing Toolbox or Filter Design Toolbox? It could make filtering easier.
Back to top
vjfaisal



Joined: 24 Sep 2006
Posts: 264
Location: pakistan


Post30 Jun 2007 10:24   

Re: need help in MATLAB ( how to convert in microvolt)


ya Fs=250 hz

i hav use ti fdatool ,but no need ......here i wanty result from this signal/data

i need Yaxis in to show in microvolts (normailized) and Xaxis in frquency in (Hz)
Normailized

hope so u understand it....

best regards

Added after 6 minutes:

please also tell me, what does it means " 10% of deviation"

See this in the matlab caution part of kaiserord...i want to know in which context ,it is telling

regards
Back to top
echo47



Joined: 07 Apr 2002
Posts: 4206
Helped: 566


Post30 Jun 2007 12:01   

Re: need help in MATLAB ( how to convert in microvolt)


I'm not sure exactly what you mean by "normalized", but how about this example?
You can simply copy-and-paste it into your MATLAB Command Window.
You can select an input file or a test waveform by uncommenting one of the three "y = ..." lines near the top.
When the input signal is a sinewave of 1 uV peak, the spectrum plot shows 1 uV.
I did not apply any windowing prior to the FFT, so you may see some spectral leakage.
With longer input signals, the FFT will become slow, so you may want to redesign using other techniques.
You can zoom-in on the spectrum plots to see the 12-19 Hertz region. I did that in eeg1.gif (attached below).

I'm not familiar with kaiserord. Maybe someone else can help you with that question.

Code:
% Input data and plot it
fs = 250;                                       % sample rate
y = textread('a.txt')' * 1e-6;                  % assume data is microvolts
%y = textread('C3d4.txt')' * 1e-6;              % assume data is microvolts
%y = 9e-6 * sin(2*pi*13.0*(1:fs)/fs);           % test signal
N = length(y);
t = (0 : N-1) / fs;
subplot(2,2,1); plot(t,y*1e6); xlim([0 max(t)]);
title('Input Data','FontWeight','bold'); xlabel('Seconds'); ylabel('Microvolts');
xlim1 = xlim;  ylim1 = ylim;                    % remember plot limits
%
% Transform to frequency domain
H = fft(y);                                     % complex spectrum
f = ifftshift(((0:N-1) - floor(N/2)) * fs/N);   % frequency points
subplot(2,2,2); stem(f, 2/N*abs(H)*1e6,'MarkerSize',0);
title('Input Data Spectrum','FontWeight','bold'); xlabel('Hertz'); ylabel('Microvolts');
xlim2 = xlim;                                   % remember plot limits
ylim2 = ylim;
%
% Simple bandpass filter by zeroing-out unwanted parts of the frequency domain
G = H .* ((abs(f) >= 12) & (abs(f) <= 19));
subplot(2,2,4); stem(f, 2/N*abs(G)*1e6,'MarkerSize',0);
title('Filtered Data Spectrum','FontWeight','bold'); xlabel('Hertz'); ylabel('Microvolts');
xlim(xlim2);
%ylim(ylim2);
zoom reset;
%
% Transform to time domain and plot it
z = real(ifft(G));
subplot(2,2,3); plot(t,z*1e6);
title('Filtered Data','FontWeight','bold'); xlabel('Seconds'); ylabel('Microvolts');
xlim(xlim1);
%ylim(ylim1);
zoom reset;



Sorry, but you need login in to view this attachment

Back to top
vjfaisal



Joined: 24 Sep 2006
Posts: 264
Location: pakistan


Post30 Jun 2007 21:36   

Re: need help in MATLAB ( how to convert in microvolt)


thanks,

i will try this , but what about my second question of deviation.

please specify the filter name used in last ur last post.

best regards

Added after 37 minutes:

hi

u hav uploadded the good results but, your program is not running ,error occured in line 15 ,of too many arguments in stem .

please upload the prog in running condition...........


best regards
Back to top
echo47



Joined: 07 Apr 2002
Posts: 4206
Helped: 566


Post01 Jul 2007 4:48   

need help in MATLAB ( how to convert in microvolt)


The code runs fine in MATLAB 7.3 and 7.4 on two different Windows computers. Maybe you have an old version of MATLAB that doesn't support some features of "stem"? Check your MATLAB manual. Or maybe something went wrong during your cut-and-paste.

I don't know the filter's name. I simply zeroed-out unwanted points in the frequency domain.
Back to top
vjfaisal



Joined: 24 Sep 2006
Posts: 264
Location: pakistan


Post02 Jul 2007 3:40   

Re: need help in MATLAB ( how to convert in microvolt)


i hav matlab 6.1 version ,, your code will running on 7.1 or not.....
Back to top
echo47



Joined: 07 Apr 2002
Posts: 4206
Helped: 566


Post02 Jul 2007 6:05   

need help in MATLAB ( how to convert in microvolt)


I don't know about versions 6.1 or 7.1.

You can look in your 6.1 manual to see what's different about "stem", and make the necessary changes.
Maybe 6.1 doesn't like ,'MarkerSize',0 so try ,'MarkerSize',1 or try ,'marker','none' or try deleting those two parameters.
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Digital Signal Processing -> need help in MATLAB ( how to convert in microvolt)
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
Help how to convert -ve image to +ve image using MATLAB (3)
how to convert c to matlab (3)
How do I convert my MATLAB files to C? (7)
How to convert Matlab to HDL? (5)
sense several microvolt,who can help me .3q (14)
how to convert matlab m file to c code (10)
how to convert matlab code to simulink? (1)
How to convert matlab m script file to executable? (6)
how convert matlab files to exe file? (1)
using matlab how to convert string to vector ? (1)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS