steemm Poziom 4

Joined: 21 Mar 2009 Posts: 9 Location: Szczecin
|
#1
19 Mar 2010 17:34 wykreślanie charakterystyk filtrów pasywnych w matlab |
|
|
|
| Code: |
% --- Executes on button press in wykres.
function wykres_Callback(hObject, eventdata, handles)
% hObject handle to wykres (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
axes(handles.axes1)
f= str2num( get( handles.edit1 , 'string' ) ); %pobranie wartości z pola edit
f0=[0:0,1:f+1000]; %częstotliwość nie wiem czy dobrze
omega=f./f0;
%pobranie wartości stałej k wartości L i C
k= str2num( get( handles.edit2 , 'string' ) );
l=str2num( get( handles.cewka , 'string' ) );
c=str2num( get( handles.kondensator , 'string' ) );
a=sqrt(l/c);
if( get( handles.p1 , 'value' ) == 1 )
Z=a.*(1./(sqrt(omega)));
plot(f0,Z);
end;
if( get( handles.p2 , 'value' ) == 1 );
title('Z=f(f)');
xlabel('f data');
ylabel('Z data');
end;
if( get( handles.p3 , 'value' ) == 1 )
Z=a.*sqrt(1-omega);
title('Z=f(f)');
xlabel('f data');
ylabel('Z data');
plot(f0,Z);
plot(f,Z);
end;
guidata(hObject, handles); |
może ktoś się orientuje na zagadnieniach z elektrotechniki i na filtrach typu K dolnoprzepustowych i mi powie co mi tu nie działa ?
|
|