Interface with 'inputdlg'-MATLAB

3 ビュー (過去 30 日間)
Margarida Chiote
Margarida Chiote 2020 年 6 月 13 日
回答済み: Harsha Priya Daggubati 2020 年 6 月 16 日
I want to process a signal by applying a filter. I wanted the user to select the file and some filter parameters. For that I produced the following code, and the file selection does't work. Do you know any fuction that I can implement here to read the file?
SV1=uigetfile('*.mat','Select Input File'); %select the file
sampleRate = inputdlg('Select Sample Rate'); %select Sample Rate
lowEnd = inputdlg('Select lowEnd'); %select lowEnd
highEnd = inputdlg('Select highEnd'); %select highEnd
filterOrder = inputdlg('Select filterOrder');%select filterOrder
t_total1=floor(12288/sampleRate);
t1=(0:1/sampleRate:t_total1-(t_total1/12288))*1000;
O1_1 = SV1(:,9);
[b, a] = butter(filterOrder, [lowEnd highEnd]/(sampleRate/2)); % Generate filter coefficients
SSV1_1 = filtfilt(b, a, O1_1); %filtered signal
matlab filter parameters interface

回答 (1 件)

Harsha Priya Daggubati
Harsha Priya Daggubati 2020 年 6 月 16 日
Hi,
What do you mean by fileselection is not working? I can see you are accessing 9th column from the file read, what is the issue you are facing?
'uigetfile' allows you to select files at a specified location. You can look at the following documentation page:

カテゴリ

Help Center および File ExchangeAudio and Video Data についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by