Consider the MATLAB file Parameter_effect.m Think of an equation or formula that
ID: 3774926 • Letter: C
Question
Consider the MATLAB file Parameter_effect.m
Think of an equation or formula that you use in any of your major courses, where you can show the effect of a parameter using MATLAB animation. Check how the sprintf command is used. Briefly explain your application in your comments. Can you please use Matlab! Also can you write the code so I can just rewrite it into matlab. Comments would be appreciated. Thank you!
Showing the effect of an equation parameter using graphics
%=========================================================================
close all
clear
clc
%-------------- Amplitude change in a sine function ----------------------
x = 0:0.01:2*pi; % Define the x vector
for a = 1:0.1:10 % a has he differecnt amplitude values tested
y = a*sin(x); % function definition
plot(x,y);
axis([0 2*pi -15 15]) % Set a fixed graph size and axes limits
drawnow % graphics effect
grid on
title('The effect of the amplitude a in y = asin(x)') % title
xlabel('x');
ylabel('y'); % sprintf is used to show the
text(5.2,7,sprintf('a = %.1f',a)) % different values of a when
% they are applied
pause (0.1) % pause is used to slow down the graphics
end
pause
%------------ Frequency change in a sine wave -----------------------------
x = 0:0.01:20*pi;
for b = 1:0.1:10
y = 10*sin(b*x);
plot(x,y,'r');
axis([0 10 -15 15])
drawnow
grid on
title('The effect of the angular frequency b in y = 10sin(bx)')
xlabel('x');
ylabel('y');
text(5.2,11,sprintf('b = %.1f',b))
pause (0.2)
end
Explanation / Answer
suitable candidates for prototyping consist of complex interactions, new functionality and modifications in workflow, technology or layout. as an example, prototyping seek outcomes is useful whilst you need to leave considerably from the standard search experience; say, to introduce faceted search or the ability to preview a document without leaving the search outcomes.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.