Interface with 'inputdlg'-MATLAB

조회 수: 1 (최근 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 CenterFile Exchange에서 Filter Design에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by