Use the function help or the on-line help in combination with MATLAB/Octave to f
ID: 3782168 • Letter: U
Question
Use the function help or the on-line help in combination with MATLAB/Octave to familiarize yourself with the following MATLAB/Octave functions: clear, clc, who, demo, ones, zeros, eye, diag, input, pause, disp, fprintf, load, save, format, plot, xlabel, ylabel, title, length, size, mean, median, std, max, min, sum, abs, squareroot , exp, cos, sin, roots, sort, hist, any. find, all, diff. Write a MATLAB script that makes use of all the functions listed above (note: the script does not need to do anything useful). Write the MATLAB code to construct the following matrices using the functions diag, ones, zeros, eye, the colon operator M:r', and the transpose operator.Explanation / Answer
Answer for 2:
% As per the Q&A guidelines we are allowed to answer some minimum number of
% questions only. So hope it will help you
clear, clc;
who p*
demo matlab
ones(3)
zeros(3)
eye(3)
A = [1 2 3 4 5];
diag(A)
n = input('Enter a num: ');
disp(n);
fprintf('Entered number is: %d ',n);
load(filename);
save(filename);
format short
plot([1 2 3 4],[1 2 3 4]);
title('Plot title');
xlabel('xlabel');
ylabel('ylabel');
%}
3.
A = zeros(10);
A = diag([1 2 3 4 5 6 7 8 9 10]);
A(1:10,1:1) = [1 2 3 4 5 6 7 8 9 10];
A(1:1,1:10) = transpose(A(1:10,1:1));
4.
A = cumprod([1:10])
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.