How to plot the following figures?

1 visualización (últimos 30 días)
Hyacinthe Nshuti
Hyacinthe Nshuti el 17 de En. de 2021
Comentada: Hyacinthe Nshuti el 18 de En. de 2021
I am a new user and I am looking a help to plot the following figures. Thanks
  1. 1.1. Create a 2 by 2 grid of subplots (i.e., a figure with several plots)! On each subplot plot a random pair of complex conjugates from the unit circle (Z = 1*exp(1j*2*pi*rand(4,1)) using black circles (plot(real(Z(1)), imag(Z(1)), 'ko'), etc.)!
  1. 1.2. Create a plot: x-axis label is ‘time [s]’, y-axis label is ‘temperature [C]’, and (time, temperature) samples are plotted as red stars ('r*'). Four time instances are at regular interval from 0 to 10. Use linspace to create them. The respective temperature samples are: (15, 14, 10, -1). Set the axis scales appropriately in the M file using xlim and ylim commands!

Respuestas (1)

Image Analyst
Image Analyst el 17 de En. de 2021
Editada: Image Analyst el 17 de En. de 2021
For 1.1, did you look up how subplot() works in the help? If you had, you would have learned this:
subplot(2, 2, 1);
plot(real(Z), real(Z), 'ko', 'LineWidth', 2);
grid on;
subplot(2, 2, 2);
plot(real(Z), imag(Z), 'ko', 'LineWidth', 2);
grid on;
subplot(2, 2, 3);
plot(
subplot(2, 2, 4);
plot(
Question 1.2 is the same -- did you look up ylabel(), linspace(), and ylim() in the help? It should be really easy and straightforward after you do.
  1 comentario
Hyacinthe Nshuti
Hyacinthe Nshuti el 18 de En. de 2021
Thanks for your answer.
wish u the best!

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by