⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 patchui2.m

📁 The Finite Difference Time Domain Method for Electromagnetics With MATLAB Simulations Atef Elshe
💻 M
📖 第 1 页 / 共 3 页
字号:
    if ((w/h) < 1)         ereff=((er+1)/2)+((er-1)/2)*((1+12*(h/w))^(-.5) + (0.04*(1-(w/h)^2)));    else        ereff=((er+1)/2)+((er-1)/2)*(1+12*(h/w))^(-.5);    end    dw=(t/pi)*log((4*exp(1))/ sqrt((t/h)^2 + ((1/pi)/(w/t+1.1))^2 ));    dwp=dw*((1+(1/ereff))/2);    wp=w+dwp;    a1=(120*pi)/(2*pi*sqrt(2*(1+er)));    a2=(4*h)/wp;    a3=(14+(8/ereff))/11;    a4=sqrt((a3*a2)^2+(pi^2*(1+(1/ereff))/2));    z0=a1*log(1+a2*(a3*a2+a4));    endset(findobj('Tag','edit17'),'String',num2str(sprintf('%2.4f',w*10^3)));set(findobj('Tag','edit18'),'String',num2str(sprintf('%2.2f',w*10^3/dx)));function edit12_Callback(hObject, eventdata, handles)% hObject    handle to edit12 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of edit12 as text%        str2double(get(hObject,'String')) returns contents of edit12 as a double% --- Executes during object creation, after setting all properties.function edit12_CreateFcn(hObject, eventdata, handles)% hObject    handle to edit12 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.%       See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))    set(hObject,'BackgroundColor','white');endfunction edit13_Callback(hObject, eventdata, handles)% hObject    handle to edit13 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of edit13 as text%        str2double(get(hObject,'String')) returns contents of edit13 as a double% --- Executes during object creation, after setting all properties.function edit13_CreateFcn(hObject, eventdata, handles)% hObject    handle to edit13 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.%       See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))    set(hObject,'BackgroundColor','white');endfunction edit14_Callback(hObject, eventdata, handles)% hObject    handle to edit14 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of edit14 as text%        str2double(get(hObject,'String')) returns contents of edit14 as a double% --- Executes during object creation, after setting all properties.function edit14_CreateFcn(hObject, eventdata, handles)% hObject    handle to edit14 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.%       See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))    set(hObject,'BackgroundColor','white');endfunction edit15_Callback(hObject, eventdata, handles)% hObject    handle to edit15 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of edit15 as text%        str2double(get(hObject,'String')) returns contents of edit15 as a double% --- Executes during object creation, after setting all properties.function edit15_CreateFcn(hObject, eventdata, handles)% hObject    handle to edit15 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.%       See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))    set(hObject,'BackgroundColor','white');endfunction edit16_Callback(hObject, eventdata, handles)% hObject    handle to edit16 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of edit16 as text%        str2double(get(hObject,'String')) returns contents of edit16 as a double% --- Executes during object creation, after setting all properties.function edit16_CreateFcn(hObject, eventdata, handles)% hObject    handle to edit16 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.%       See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))    set(hObject,'BackgroundColor','white');endfunction edit17_Callback(hObject, eventdata, handles)% hObject    handle to edit17 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of edit17 as text%        str2double(get(hObject,'String')) returns contents of edit17 as a double% --- Executes during object creation, after setting all properties.function edit17_CreateFcn(hObject, eventdata, handles)% hObject    handle to edit17 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.%       See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))    set(hObject,'BackgroundColor','white');endfunction edit18_Callback(hObject, eventdata, handles)% hObject    handle to edit18 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of edit18 as text%        str2double(get(hObject,'String')) returns contents of edit18 as a double% --- Executes during object creation, after setting all properties.function edit18_CreateFcn(hObject, eventdata, handles)% hObject    handle to edit18 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.%       See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))    set(hObject,'BackgroundColor','white');endfunction edit19_Callback(hObject, eventdata, handles)% hObject    handle to edit19 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of edit19 as text%        str2double(get(hObject,'String')) returns contents of edit19 as a double% --- Executes during object creation, after setting all properties.function edit19_CreateFcn(hObject, eventdata, handles)% hObject    handle to edit19 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.%       See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))    set(hObject,'BackgroundColor','white');endfunction edit20_Callback(hObject, eventdata, handles)% hObject    handle to edit20 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of edit20 as text%        str2double(get(hObject,'String')) returns contents of edit20 as a double% --- Executes during object creation, after setting all properties.function edit20_CreateFcn(hObject, eventdata, handles)% hObject    handle to edit20 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.%       See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))    set(hObject,'BackgroundColor','white');endfunction edit21_Callback(hObject, eventdata, handles)% hObject    handle to edit21 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of edit21 as text%        str2double(get(hObject,'String')) returns contents of edit21 as a double% --- Executes during object creation, after setting all properties.function edit21_CreateFcn(hObject, eventdata, handles)% hObject    handle to edit21 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.%       See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))    set(hObject,'BackgroundColor','white');endfunction edit22_Callback(hObject, eventdata, handles)% hObject    handle to edit22 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of edit22 as text%        str2double(get(hObject,'String')) returns contents of edit22 as a double% --- Executes during object creation, after setting all properties.function edit22_CreateFcn(hObject, eventdata, handles)% hObject    handle to edit22 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.%       See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))    set(hObject,'BackgroundColor','white');endfunction setspaceglobal A B C D E F H ts dz dy dx er fftstart fftstopX=20+A+B+C+D+10+(61-(A+B+C+D));Y=20+25+12+E+F+(55-E-F);Z=20+18+H;set(findobj('Tag','edit19'),'String',num2str(X));set(findobj('Tag','edit20'),'String',num2str(Y));set(findobj('Tag','edit21'),'String',num2str(Z));set(findobj('Tag','edit22'),'String',num2str(X*Y*Z));% --- Executes on slider movement.function slider6_Callback(hObject, eventdata, handles)% hObject    handle to slider6 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)% Hints: get(hObject,'Value') returns position of slider%        get(hObject,'Min') and get(hObject,'Max') to determine range of sliderglobal FF= round(get(hObject,'Value'));set(hObject,'Value', F);h1=findobj('Tag','text58');set(h1,'String', num2str(F));setspace;% --- Executes during object creation, after setting all properties.function slider6_CreateFcn(hObject, eventdata, handles)% hObject    handle to slider6 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    empty - handles not created until after all CreateFcns called% Hint: slider controls usually have a light gray background.if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))    set(hObject,'BackgroundColor',[.9 .9 .9]);end% --- Executes on slider movement.function slider7_Callback(hObject, eventdata, handles)% hObject    handle to slider7 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)global HH= round(get(hObject,'Value'));set(hObject,'Value', H);h1=findobj('Tag','text61');set(h1,'String', num2str(H));setspace;% --- Executes during object creation, after setting all properties.function slider7_CreateFcn(hObject, eventdata, handles)% hObject    handle to slider7 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    empty - handles not created until after all CreateFcns called% Hint: slider controls usually have a light gray background.if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))    set(hObject,'BackgroundColor',[.9 .9 .9]);end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -