Mudanças entre as edições de "Aula 8 - FIC MATLAB 2019-2"

De MediaWiki do Campus São José
Ir para navegação Ir para pesquisar
(Criou página com '%-- 19-09-2019 19:03:37 --% clc x = true x1 = 1 whos y = false whos y help logical A = logical([5 0 9 1]) whos A vetor = [1 2 3 1 6 9] size(vetor) vetor_log = [false true true fa...')
 
 
Linha 1: Linha 1:
 +
<syntaxhighlight lang=matlab class="mw-collapsible">
 
%-- 19-09-2019 19:03:37 --%
 
%-- 19-09-2019 19:03:37 --%
 
clc
 
clc
Linha 70: Linha 71:
 
c
 
c
 
b
 
b
 +
</syntaxhighlight>

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

%-- 19-09-2019 19:03:37 --%
clc
x = true
x1 = 1
whos
y = false
whos
y
help logical
A = logical([5 0 9 1])
whos A
vetor = [1 2 3 1 6 9]
size(vetor)
vetor_log = [false true true false false true]
vetor(vetor_log)
whos vetor
vetor(2)
vetor
vetor_log
vetor(vetor_log)
~vetor(vetor_log)
whos
vetor == vetor_log
vetor
vetor_log
vetor ~= vetor_log
vetor > vetor_log
b = [3 1 6 2 7 1]
vetor > b
vetor
b > vetor
vetor < b
vetor <= b
vetor >= b
b = [3 1 6 2 7 3]
b = [3 1 6 2 7 9]
b > vetor
b >= vetor
clc
vetor
vetor < 6
vetor > 1
vetor > 1 && vetor < 6
vetor > 1 & vetor < 6
vetor > 1 | vetor < 6
vetor2 = [1 4 -3 5 -2 6]
vetor2 > 1 | vetor2 < 6
vetor2 > 1 | vetor2 = 6
vetor2 > 1 | vetor2 == 6
vetor2
vetor2 > 1 | vetor2 == -3
vetor > 1
~(vetor > 1)
whos
vetor == vetor2
isequal(vetor,vetor2)
vetor_igual = vetor
vetor
vetor_igual == vetor
isequal(vetor,vetor_igual)
vetor(2) = 6
isequal(vetor,vetor_igual)
a = 'Lasanha de bolonhesa';
b = 'Lasanha de calabresa';
a == b
strcmp(a,b)
c = 'lasanha de calabresa';
strcmp(c,b)
strcmpi(c,b)
c
b