[go: up one dir, main page]

0% found this document useful (0 votes)
31 views3 pages

Script Baja 1

Ya

Uploaded by

Muhammad Nizal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views3 pages

Script Baja 1

Ya

Uploaded by

Muhammad Nizal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

function varargout = Baja(varargin)

% BAJA MATLAB code for Baja.fig


% BAJA, by itself, creates a new BAJA or raises the existing
% singleton*.
%
% H = BAJA returns the handle to a new BAJA or the handle to
% the existing singleton*.
%
% BAJA('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in BAJA.M with the given input arguments.
%
% BAJA('Property','Value',...) creates a new BAJA or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before Baja_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to Baja_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help Baja

% Last Modified by GUIDE v2.5 20-Oct-2024 10:23:47

% Begin initialization code - DO NOT EDIT


gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @Baja_OpeningFcn, ...
'gui_OutputFcn', @Baja_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT

% --- Executes just before Baja is made visible.


function Baja_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to Baja (see VARARGIN)

% Choose default command line output for Baja


handles.output = hObject;

% Update handles structure


guidata(hObject, handles);
% UIWAIT makes Baja wait for user response (see UIRESUME)
% uiwait(handles.figure1);

% --- Outputs from this function are returned to the command line.
function varargout = Baja_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure


varargout{1} = handles.output;

function Input_Lx_Callback(hObject, eventdata, handles)


% hObject handle to Input_Lx (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 Input_Lx as text


% str2double(get(hObject,'String')) returns contents of Input_Lx as a double

% --- Executes during object creation, after setting all properties.


function Input_Lx_CreateFcn(hObject, eventdata, handles)
% hObject handle to Input_Lx (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');
end

function Input_b_Callback(hObject, eventdata, handles)


% hObject handle to Input_b (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 Input_b as text


% str2double(get(hObject,'String')) returns contents of Input_b as a double

% --- Executes during object creation, after setting all properties.


function Input_b_CreateFcn(hObject, eventdata, handles)
% hObject handle to Input_b (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');
end

% --- Executes on button press in hitungstep2.


function hitungstep2_Callback(hObject, eventdata, handles)
% hObject handle to hitungstep2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Mengambil Data Input
b=STR2NUM(get(handle.Input_b));'string';
t=STR2NUM(get(handle.Input_t));'string';
fy=STR2NUM(get(handle.Input_fy));'string';
% Perhitungan sayap (flanges)
bt1=(b/t);
lamda1=(0.56)*(sqrt(200000/fy));
bt2=(b/t);
lamda2=(1.49)*(sqrt(200000/fy));
%menampilkan hasil perhitungan sayap (flanges)
set(handles.output_bt1,'string',bt1);
set(handles.output_lamda1,'string',lamda1);
set(handles.output_bt2,'string',bt2);
set(handles.output_lamda2,'string',lamda2);

% --- Executes during object creation, after setting all properties.


function step1_CreateFcn(hObject, eventdata, handles)
% hObject handle to step1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called

% --- Executes during object creation, after setting all properties.


function step2_CreateFcn(hObject, eventdata, handles)
% hObject handle to step2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called

% --- Executes during object creation, after setting all properties.


function step4_CreateFcn(hObject, eventdata, handles)
% hObject handle to step4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called

You might also like