BIOE 371University of Maryland Linear System Questions Response here you go, again this is due next tuesday midnight (eastern time)thanks!!!i will let you know if i need help for the project as well if you are ok with that Questions:
———1. (2 points) Identify the 5 items (ITEM1 to ITEM5) needed to
make the GUI-based calculator program below work correctly.
It allows its user to press buttons to enter a mathematical
expression in the text box (for example: 3.4+5/7.1 ) and
then, when the equal button (=) is pressed it calculates the
value of that expression (using MATLAB’s eval() function)
and displays the result in the text box. The expression
can also be typed directly into the box (using the keyboard).
%=============== start of GUI-based Program ======================
function HW11_Q01
fig = ITEM5(‘numbertitle’,’off’,’menubar’,’none’,’position’,[100 200 170 140]);
ITEM4(‘style’,’edit’,’string’,”,’position’,[5 110 160 25],…
‘tag’,’x’,’horizontalalignment’,’right’);
bl = {‘7′,’8′,’9′,’/’,’4′,’5′,’6′,’*’,’1′,’2′,’3′,’-‘,’0′,’.’,’=’,’+’};
bt = {‘a’,’b’,’c’,’d’,’e’,’f’,’g’,’h’,’i’,’j’,’k’,’l’,’m’,’n’,’o’,’p’};
bw = 40; bh = 25;
for k = 1:length(bl)
ITEM4(‘style’,’pushbutton’,’string’,bl{k},’tag’,bt{k},…
‘position’,[5+bw*rem(k-1,4) 80-bh*floor((k-1)/4) bw bh]);
end
% -+-+-+-+- Boiler Plate: Single Callback -+-+-+-+-+-+-+-+-+-+handles = guihandles(fig); guidata(fig,handles); hca = struct2cell(handles);
for k = 1:length(hca)
if isfield(hca{k},’callback’) | isprop(hca{k},’callback’)
set(hca{k},’callback’,{@main_cb,handles});
end
end
% ———- main callback (do everything) –function ITEM3(uiobject,eventdata,handles)
x = get(ITEM2,’string’); % get expression from text box
tag = get(uiobject,’tag’);
ITEM1 tag
case {‘a’,’b’,’c’,’e’,’f’,’g’,’i’,’j’,’k’,’m’,’n’,’d’,’h’,’l’,’p’}
set(ITEM2,’string’,[x get(uiobject,’string’)]);
case {‘o’}
set(ITEM2,’string’,num2str(eval(x)));
end
%=============== end of GUI-based Program ========================
Your answers:
ITEM1 =
ITEM2 =
ITEM3 =
ITEM4 =
ITEM5 =
2. (2) Use MATLAB’s function roots() to find the real solutions
of the polynomial equation:
x^5 = 15*x^3 – 125
Paste your code and results in the space below (Note: we
want only the real solutions, i.e. those with imaginary
part equal to zero).
3. (3 points) Use MATLAB’s function fzero() to find 3 distinct
real solutions of the equation:
erfc( x ) J0( 10 x ) = 1.2 ln( x + 1.65 )
in the interval:
-1.5 < x < 1.5
where J0() is the Bessel function of the first kind, of order
zero, erfc() is the complementary error function, and ln()
is the natural logarithm function. Use a for-loop over 3
appropriate guesses or intervals. Paste your script and the
solutions (values of x) below. (hint: exploring this problem by
plotting the associated function, as a first step, should be
helpful).
4. (3) A zookeeper is attempting to clean a polar bear enclosure
without waking up the two polar bears that are sleeping in it.
The body of each polar bear is viewed as a circle of diameter
1.4 meters in the x-z plane. The body of polar bear A (Arnold)
is centered at (x,z) = (-0.5,1.0) while that of polar bear B
(Bernice) is centered at (x,z) = (1.5,0.5) (all coordinates are
in meters). The zookeeper is using a water jet with a trajectory
described by: z = 2.5 - 0.33 x - 0.25 x^2 (it is sligthly
affected by convective air currents). Use a plot of the
situation and MATLAB's function fsolve() to identify whether
either (or both, or neither) bear(s) is likely to be awakened
(and angried) by being struck by the zookeeper's cleaning water
jet, and to find the exact coordinates at which the jet (which
may be upwards or downwards) hits the bear(s), if any. Paste
your code, plot, conclusions and intersection(s) in the space
below.
Purchase answer to see full
attachment
Consider the following information, and answer the question below. China and England are international trade…
The CPA is involved in many aspects of accounting and business. Let's discuss some other…
For your initial post, share your earliest memory of a laser. Compare and contrast your…
2. The Ajax Co. just decided to save $1,500 a month for the next five…
How to make an insertion sort to sort an array of c strings using the…
Assume the following Keynesian income-expenditure two-sector model: AD = Cp + Ip Cp = Co…