Mudanças entre as edições de "FIC Matlab 2019 2/aula4 comandos"

De MediaWiki do Campus São José
Ir para navegação Ir para pesquisar
(Criou página com '%-- 05-09-2019 18:56:23 --% %questao 6 aula passada v = 1:100; fracoes = 1./v x = sum(fracoes) clc vetor = 0:0.1:2*pi clc vetor = 0:0.1:2*pi; plot(vetor) plot(sin(vetor)) figure ...')
 
 
Linha 1: Linha 1:
 +
<syntaxhighlight lang=matlab class="mw-collapsible">
 
%-- 05-09-2019 18:56:23 --%
 
%-- 05-09-2019 18:56:23 --%
 
%questao 6 aula passada
 
%questao 6 aula passada
Linha 78: Linha 79:
 
stem(t,x)
 
stem(t,x)
 
xlim([-0.1 0.5])
 
xlim([-0.1 0.5])
 +
</syntaxhighlight>

Edição atual tal como às 19h11min de 10 de setembro de 2019

%-- 05-09-2019 18:56:23 --%
%questao 6 aula passada
v = 1:100;
fracoes = 1./v
x = sum(fracoes)
clc
vetor = 0:0.1:2*pi
clc
vetor = 0:0.1:2*pi;
plot(vetor)
plot(sin(vetor))
figure
x = [1 5 3 6 8]
plot(vetor)
figure
plot(x)
stem(x)
grid on
bar(x)
vetor = 1:1000;
bar(vetor)
stairs(x)
hold on
bar(x)
stairs(x,'k')
close all
stairs(x,'k')
vetor = 0:0.1:2*pi;
plot(sin(vetor),'c')
plot(sin(vetor),'c','Linewidth',2)
hold on
stairs(x, 'm', 'Linewidth', 2)
stairs(x, 'g', 'Linewidth', 2)
stairs(x, 'y', 'Linewidth', 2)
stairs(x, 'r', 'Linewidth', 2)
vetor = 0:pi/4:2*pi;
plot(sin(vetor),'k','Linewidth',2)
figure
plot(sin(vetor),'k','Linewidth',2)
clc
plot(sin(vetor),'k*','Linewidth',2)
plot(sin(vetor),'k-*','Linewidth',2)
plot(sin(vetor),'y:','Linewidth',2)
plot(sin(vetor),'r:','Linewidth',2)
plot(sin(vetor),'r-.','Linewidth',2)
plot(sin(vetor),'rx','Linewidth',2)
plot(sin(vetor),'rx-','Linewidth',2)
stairs(x)
help axis
clc
axis([0 6 -1 9])
grid on
xlim([0.5 5.5])
ylim([-1.5 8.5])
xlabel('tempo (s)')
ylabel('distância (m)')
title('velocidade')
legend('vetor 1','vetor 2','vetor 3')
figura
figure
plot(sin(vetor))
stairs(x,'r-*')
hold on
plot(sin(vetor))
legend('grafico 1','grafico 2')
subplot(2,1,1)
plot(sin(vetor))
grid on
xlabel('tempo (s)')
ylabel('amplitude')
subplot(2,1,2)
bar(x,'m')
% jkdbsvs
% q1
whos
t = 0:0.1:0.4
stem(x,t)
stem(t,x)
xlim([-0.1 0.5])