Why set(handle​s.D,'Strin​g',final_D​) set(handle​s.B,'Strin​g',final_B​) set(handle​s.C,'Strin​g',final_C​) set(handle​s.C0,'Stri​ng',final_​C) set(handle​s.Designat​ion,'Strin​g',final_D​esignation​) is not printing in static text(GUI)

function varargout = test11(varargin)
% TEST11 MATLAB code for test11.fig
% TEST11, by itself, creates a new TEST11 or raises the existing
% singleton*.
%
% H = TEST11 returns the handle to a new TEST11 or the handle to
% the existing singleton*.
%
% TEST11('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in TEST11.M with the given input arguments.
%
% TEST11('Property','Value',...) creates a new TEST11 or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before test11_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to test11_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 test11
% Last Modified by GUIDE v2.5 29-Mar-2018 19:29:04
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @test11_OpeningFcn, ...
'gui_OutputFcn', @test11_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 test11 is made visible.
function test11_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 test11 (see VARARGIN)
% Choose default command line output for test11
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes test11 wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = test11_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;
% --- Executes on selection change in popupmenu1.
function popupmenu1_Callback(hObject, eventdata, handles)
% hObject handle to popupmenu1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = cellstr(get(hObject,'String')) returns popupmenu1 contents as cell array
% contents{get(hObject,'Value')} returns selected item from popupmenu1
contents=cellstr(get(hObject,'String'));
popChoice=contents(get(hObject,'Value'));
if(strcmp(popChoice,'Ball bearing'))
Choice=1;
p=1/3;
elseif(strcmp(popChoice,'Roller bearing'))
Choice=2;
p=0.3;
elseif(strcmp(popChoice,'Taper roller bearing'))
Choice=3;
end
assignin('base','Choice',Choice);
assignin('base','p',p);
% --- Executes during object creation, after setting all properties.
function popupmenu1_CreateFcn(hObject, eventdata, handles)
% hObject handle to popupmenu1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: popupmenu 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 i_C_Callback(hObject, eventdata, handles)
% hObject handle to i_C (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 i_C as text
% str2double(get(hObject,'String')) returns contents of i_C as a double
% --- Executes during object creation, after setting all properties.
function i_C_CreateFcn(hObject, eventdata, handles)
% hObject handle to i_C (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 i_L10h_Callback(hObject, eventdata, handles)
% hObject handle to i_L10h (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 i_L10h as text
% str2double(get(hObject,'String')) returns contents of i_L10h as a double
% --- Executes during object creation, after setting all properties.
function i_L10h_CreateFcn(hObject, eventdata, handles)
% hObject handle to i_L10h (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 i_L10_Callback(hObject, eventdata, handles)
% hObject handle to i_L10 (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 i_L10 as text
% str2double(get(hObject,'String')) returns contents of i_L10 as a double
% --- Executes during object creation, after setting all properties.
function i_L10_CreateFcn(hObject, eventdata, handles)
% hObject handle to i_L10 (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 n_Callback(hObject, eventdata, handles)
% hObject handle to n (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 n as text
% str2double(get(hObject,'String')) returns contents of n as a double
% --- Executes during object creation, after setting all properties.
function n_CreateFcn(hObject, eventdata, handles)
% hObject handle to n (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 dia_Callback(hObject, eventdata, handles)
% hObject handle to dia (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 dia as text
% str2double(get(hObject,'String')) returns contents of dia as a double
% --- Executes during object creation, after setting all properties.
function dia_CreateFcn(hObject, eventdata, handles)
% hObject handle to dia (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 load_factor_Callback(hObject, eventdata, handles)
% hObject handle to load_factor (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 load_factor as text
% str2double(get(hObject,'String')) returns contents of load_factor as a double
% --- Executes during object creation, after setting all properties.
function load_factor_CreateFcn(hObject, eventdata, handles)
% hObject handle to load_factor (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 Fr_Callback(hObject, eventdata, handles)
% hObject handle to Fr (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 Fr as text
% str2double(get(hObject,'String')) returns contents of Fr as a double
% --- Executes during object creation, after setting all properties.
function Fr_CreateFcn(hObject, eventdata, handles)
% hObject handle to Fr (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 Fr2_Callback(hObject, eventdata, handles)
% hObject handle to Fr2 (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 Fr2 as text
% str2double(get(hObject,'String')) returns contents of Fr2 as a double
% --- Executes during object creation, after setting all properties.
function Fr2_CreateFcn(hObject, eventdata, handles)
% hObject handle to Fr2 (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 solve.
function solve_Callback(hObject, eventdata, handles)
% hObject handle to solve (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
i_C=str2num(get(handles.i_C,'string'));
i_L10h=str2num(get(handles.i_L10h,'string'));
i_L10=str2num(get(handles.i_L10,'string'));
i_n=str2double(get(handles.n,'string'));
i_dia=str2double(get(handles.dia,'string'));
load_factor=str2double(get(handles.load_factor,'string'));
Fr1=str2double(get(handles.Fr,'string'));
Fr2=str2double(get(handles.Fr2,'string'));
Fa=str2double(get(handles.Fa,'string'));
v=str2double(get(handles.V,'string'));
assignin('base','C',i_C);
assignin('base','L10h',i_L10h);
assignin('base','L10',i_L10);
assignin('base','n',i_n);
assignin('base','dia',i_dia);
assignin('base','load_factor',load_factor);
assignin('base','Fr',Fr1);
assignin('base','Fr2',Fr2);
assignin('base','Fa',Fa);
assignin('base','V',v);
p = get(handles.popupmenu1,'Value');
Fr=get(handles.Fr,'Value');
L10h=get(handles.i_L10,'Value');
n=get(handles.n,'Value');
dia=get(handles.dia,'Value');
[final_D,final_B,final_C,final_C0,final_Designation] =ball_bearing (p,Fr,L10h,n,dia);
set(handles.D,'String',final_D)
set(handles.B,'String',final_B)
set(handles.C,'String',final_C)
set(handles.C0,'String',final_C)
set(handles.Designation,'String',final_Designation)
function Fa_Callback(hObject, eventdata, handles)
% hObject handle to Fa (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 Fa as text
% str2double(get(hObject,'String')) returns contents of Fa as a double
% --- Executes during object creation, after setting all properties.
function Fa_CreateFcn(hObject, eventdata, handles)
% hObject handle to Fa (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 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');
end
function 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');
end
function 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');
end
function edit23_Callback(hObject, eventdata, handles)
% hObject handle to edit23 (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 edit23 as text
% str2double(get(hObject,'String')) returns contents of edit23 as a double
% --- Executes during object creation, after setting all properties.
function edit23_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit23 (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 edit24_Callback(hObject, eventdata, handles)
% hObject handle to edit24 (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 edit24 as text
% str2double(get(hObject,'String')) returns contents of edit24 as a double
% --- Executes during object creation, after setting all properties.
function edit24_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit24 (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 V_Callback(hObject, eventdata, handles)
% hObject handle to V (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 V as text
% str2double(get(hObject,'String')) returns contents of V as a double
% --- Executes during object creation, after setting all properties.
function V_CreateFcn(hObject, eventdata, handles)
% hObject handle to V (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

2 commentaires

You do not show us the code for ball_bearing
%%below is the code for ball_bearing
function [final_D,final_B, final_C, final_C0, final_Designation]=ball_bearing (p,Fr,L10h,n,dia)
%p=find_p;
%Fr=input('Enter radial force in N : ');
%L10h=input('Enter expected life of 90% of bearing: ');
%n=input('Enter rpm of shaft: ');
%dia=input('Enter min acceptable dia of shaft: ');
%Step I(Dynamic load capacity)
%(Since no axial force)
P=Fr;
L10=L10h_L10(L10h,n);
%fprintf(['\nL10: %i millioin rev.\n '],L10)
Old_C=P*(L10^p);
%fprintf('\nDynamic load is %4.2f N\n',Old_C)
%Step II(Selection of bearing)
d=[12;NaN;NaN;NaN;15;NaN;NaN;NaN;17;NaN;NaN;NaN;NaN;20;NaN;NaN;NaN;NaN;NaN;25;NaN;NaN;NaN;NaN;NaN;32;NaN;NaN;NaN;NaN;NaN;35;NaN;NaN;NaN;NaN;NaN;40;NaN;NaN;NaN;NaN;NaN;45;NaN;NaN;NaN;NaN;NaN;50;NaN;NaN;NaN;NaN;NaN;55;NaN;NaN;NaN;NaN;NaN;60;NaN;NaN;NaN;NaN;NaN;65;NaN;NaN;NaN;NaN;NaN;70;NaN;NaN;NaN;NaN;NaN;75;NaN;NaN;NaN;NaN;NaN];
C=[1430;5070;6890;9750;1560;5590;7800;11400;1680;6050;9560;13500;22900;2700;7020;9360;12700;15900;30700;3120;7610;11200;14000;22500;35800;3120;11200;13300;19500;28100;43600;4030;12400;15900;25500;33200;55300;4160;13300;16800;30700;41000;63700;6050;15600;21200;33200;52700;76100;6240;16300;21600;35100;61800;87100;8320;19500;28100;43600;71500;99500;8710;19900;29600;47500;81900;108000;11700;21200;30700;55900;92300;119000;12100;28100;37700;61800;104000;143000;12500;28600;39700;66300;112000;153000];
C0=[695;2240;3100;4650;815;2500;3550;5400;930;2800;4500;6550;11800;1500;3400;4500;6200;7800;16600;1960;4000;5600;6950;11400;19600;2080;5850;6800;10000;14600;2400;3000;6950;8500;13700;18000;31000;3350;7800;9300;16600;22400;36500;3800;9300;12200;18600;30000;45500;4250;10000;13200;19600;36000;52000;5600;12200;17000;25000;41500;63000;6100;13200;18300;28000;48000;69500;8300;14600;19600;34000;56000;78000;9150;19000;24500;37500;63000;104000;9800;20000;26000;40500;72000;114000];
D=[21;28;32;37;24;32;35;42;26;35;40;47;62;32;42;42;47;52;72;37;47;47;52;62;80;42;55;55;62;72;90;47;62;62;72;80;100;52;68;68;80;90;110;58;75;75;85;100;120;65;80;80;90;110;130;72;90;90;100;120;140;78;95;95;110;130;150;85;100;100;120;140;160;90;110;110;125;150;180;95;115;115;130;160;190];
B=[5;8;10;12;5;9;11;13;5;10;12;14;17;7;8;12;14;15;19;7;8;12;15;17;21;7;9;13;16;19;23;7;9;14;17;21;25;7;9;15;18;23;27;7;10;16;19;25;29;7;10;16;20;27;31;9;11;18;21;29;33;10;11;18;22;31;35;10;11;18;23;33;37;10;13;20;24;35;42;10;13;20;25;37;45];
Designation=[61801;6001;6201;6301;61802;6002;6202;6302;61803;6003;6202;6303;6403;61804;16404;6004;6204;6304;6404;61805;16005;6005;6205;6305;6405;61806;16006;6006;6206;6306;6406;61807;16007;6007;6207;6307;6407;61808;16008;6008;6208;6308;6408;61809;166009;6009;6209;6309;6409;61810;16010;6010;6210;6310;6410;61811;16011;6011;6211;6311;6411;61812;16012;6012;6212;6312;6412;61813;16013;6013;6213;6313;6413;61814;16014;6014;6214;6314;6414;61815;10615;6015;6215;6315;6415];
Table_dia=find(d==dia);
C_of_that_dia=Table_dia+5;
Select_C=C(Table_dia:C_of_that_dia);
Subtracting_C=(abs(Select_C-Old_C));
min_C=min(Subtracting_C);
new_C = find(Subtracting_C==min_C);
if(Old_C>C(new_C+dia-3))
new_C=new_C+1;
else
new_C=new_C;
end
final_D=D((dia+new_C-3));
final_B=B((dia+new_C-3));
final_C=C((dia+new_C-3));
final_C0=C0((dia+new_C-3));
final_Designation=Designation((dia+new_C-3));
%fprintf(['\nFrom Table\nD: %i\nB: %i\nC: %i\nC0: %i\nDesignation: %i \n '],final_D,final_B,final_C,final_C0,final_Designation)

Connectez-vous pour commenter.

Réponses (2)

Saurao - I'm going to guess that
set(handles.D,'String',final_D)
set(handles.B,'String',final_B)
set(handles.C,'String',final_C)
set(handles.C0,'String',final_C)
set(handles.Designation,'String',final_Designation)
the D, B, C, C0, and Designation are not valid handles to edit text controls and are probably not even members of the handles struct. This is a guess because you didn't include the full error message and I don't see any CreateFcn or Callback functions in your above code (which would tell us that you have edit controls named as D, B, C, C0 and Designation).
Please confirm that your GUI does indeed have edit controls named as above or use the correct handles.

2 commentaires

D,B,C,C0,Designation are the handles(static txt)
Saurao - and you have verified that these handles exist? Please confirm that they do as you still haven't posted the error message (if one exists) for when you try to update these static text controls.
However, given the code that you have posted for the ball_bearing function, it appears that
[final_D,final_B,final_C,final_C0,final_Designation]
are numeric. If that is the case, then you need to convert them to strings before updating the text fields
set(handles.D,'String',num2str(final_D))
set(handles.B,'String',num2str(final_B))
set(handles.C,'String',num2str(final_C))
set(handles.C0,'String',num2str(final_C))
set(handles.Designation,'String',num2str(final_Designation))
Please note also that you probably want
set(handles.C0,'String',num2str(final_C0))
rather than re-using final_C.

Connectez-vous pour commenter.

Thanks , now it is providing the display in GUI. but the function (ball_bearing) doesn't return value to work space

2 commentaires

Given input to ball bearing should be [final_D,final_B, final_C, final_C0, final_Designation]=ball_bearing (0.333,3000,30000,600,40) Ans: final_D=90;
Functions do not return values to the workspace. You have to assign the output to a variable and look at the variable. You appear to already be doing the assignments.

Connectez-vous pour commenter.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by