hmwk3
found =
1
row =
1
col =
123
count =
19
figure(); imshow(im2(1:4,122:131,2))
im2(1:4,122:131,2)
ans =
0 255 255 255 255 255 255 0 0 0
0 255 255 255 255 255 255 255 255 0
0 0 255 255 255 255 255 0 0 0
0 0 0 0 0 0 0 0 0 0
whos
Name Size Bytes Class Attributes
ans 4x10 40 uint8
blue 705x908 5121120 double
cellimage 705x908 640140 uint8
col 1x1 8 double
count 1x1 8 double
found 1x1 1 logical
im2 705x908x3 1920420 uint8
red 705x908 5121120 double
row 1x1 8 double
x 705x908x3 1920420 uint8
y 705x908 640140 logical
copy = zero(705, 908, 'unit8');
{Undefined function 'zero' for input arguments of type
'double'.
}
copy = zero(705, 908, 'uint8');
{Undefined function 'zero' for input arguments of type
'double'.
}
copy = zeros(705, 908, 'uint8');
help zeroes
zeroes not found.
Use the Help browser search field to search the documentation, or
type "help help" for help command options, such as help for methods.
copy(1:5, 1:5)
ans =
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
im2(1:4,122:131,2)
ans =
0 255 255 255 255 255 255 0 0 0
0 255 255 255 255 255 255 255 255 0
0 0 255 255 255 255 255 0 0 0
0 0 0 0 0 0 0 0 0 0
whos
Name Size Bytes Class Attributes
ans 4x10 40 uint8
blue 705x908 5121120 double
cellimage 705x908 640140 uint8
col 1x1 8 double
copy 705x908 640140 uint8
count 1x1 8 double
found 1x1 1 logical
im2 705x908x3 1920420 uint8
red 705x908 5121120 double
row 1x1 8 double
x 705x908x3 1920420 uint8
y 705x908 640140 logical
imshow(cellimage)
im2(1:4,122:131,2)
ans =
0 255 255 255 255 255 255 0 0 0
0 255 255 255 255 255 255 255 255 0
0 0 255 255 255 255 255 0 0 0
0 0 0 0 0 0 0 0 0 0
count_matrix = (im2 == 255);
count_matrix(1:4, 122:131)
ans =
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
count_matrix(1:4, 122:131,2)
ans =
0 1 1 1 1 1 1 0 0 0
0 1 1 1 1 1 1 1 1 0
0 0 1 1 1 1 1 0 0 0
0 0 0 0 0 0 0 0 0 0
sum(count_matrix)
ans(:,:,1) =
Columns 1 through 10
0 0 0 0 0 0 0 0 0 0
Columns 11 through 20
0 0 0 0 0 0 0 0 0 0
Columns 21 through 30
0 0 0 0 0 0 0 0 0 0
Columns 31 through 40
0 0 0 0 0 0 0 0 0 0
Columns 41 through 50
0 0 0 0 0 0 0 0 0 0
Columns 51 through 60
0 0 0 0 0 0 0 0 0 0
Columns 61 through 70
0 0 0 0 0 0 0 0 0 0
Columns 71 through 80
0 0 0 0 0 0 0 0 0 0
Columns 81 through 90
0 0 0 0 0 0 0 0 0 0
Columns 91 through 100
0 0 0 0 0 0 0 0 0 0
Columns 101 through 110
0 0 0 0 0 0 0 0 0 0
Columns 111 through 120
0 0 0 0 0 0 0 0 0 0
Columns 121 through 130
0 0 0 0 0 0 0 0 0 0
Columns 131 through 140
0 0 0 0 0 0 0 0 0 0
Columns 141 through 150
0 0 0 0 0 0 0 0 0 0
Columns 151 through 160
0 0 0 0 0 0 0 0 0 0
Columns 161 through 170
0 0 0 0 0 0 0 0 0 0
Columns 171 through 180
0 0 0 0 0 0 0 0 0 0
Columns 181 through 190
0 0 0 0 0 0 0 0 0 0
Columns 191 through 200
0 0 0 0 0 0 0 0 0 0
Columns 201 through 210
0 0 0 0 0 0 0 0 0 0
Columns 211 through 220
0 0 0 0 0 0 0 0 0 0
Columns 221 through 230
0 0 0 0 0 0 0 0 0 0
Columns 231 through 240
0 0 0 0 0 0 0 0 0 0
Columns 241 through 250
0 0 0 0 0 0 0 0 0 0
Columns 251 through 260
0 0 0 0 0 0 0 0 0 0
Columns 261 through 270
0 0 0 0 0 0 0 0 0 0
Columns 271 through 280
0 0 0 0 0 0 0 0 0 0
Columns 281 through 290
0 0 0 0 0 0 0 0 0 0
Columns 291 through 300
0 0 0 0 0 0 0 0 0 0
Columns 301 through 310
0 0 0 0 0 0 0 0 0 0
Columns 311 through 320
0 0 0 0 0 0 0 0 0 0
Columns 321 through 330
0 0 0 0 0 0 0 0 0 0
Columns 331 through 340
0 0 0 0 0 0 0 0 0 0
Columns 341 through 350
0 0 0 0 0 0 0 0 0 0
Columns 351 through 360
0 0 0 0 0 0 0 0 0 0
Columns 361 through 370
0 0 0 0 0 0 0 0 0 0
Columns 371 through 380
0 0 0 0 0 0 0 0 0 0
Columns 381 through 390
0 0 0 0 0 0 0 0 0 0
Columns 391 through 400
0 0 0 0 0 0 0 0 0 0
Columns 401 through 410
0 0 0 0 0 0 0 0 0 0
Columns 411 through 420
0 0 0 0 0 0 0 0 0 0
Columns 421 through 430
0 0 0 0 0 0 0 0 0 0
Columns 431 through 440
0 0 0 0 0 0 0 0 0 0
Columns 441 through 450
0 0 0 0 0 0 0 0 0 0
Columns 451 through 460
0 0 0 0 0 0 0 0 0 0
Columns 461 through 470
0 0 0 0 0 0 0 0 0 0
Columns 471 through 480
0 0 0 0 0 0 0 0 0 0
Columns 481 through 490
0 0 0 0 0 0 0 0 0 0
Columns 491 through 500
0 0 0 0 0 0 0 0 0 0
Columns 501 through 510
0 0 0 0 0 0 0 0 0 0
Columns 511 through 520
0 0 0 0 0 0 0 0 0 0
Columns 521 through 530
0 0 0 0 0 0 0 0 0 0
Columns 531 through 540
0 0 0 0 0 0 0 0 0 0
Columns 541 through 550
0 0 0 0 0 0 0 0 0 0
Columns 551 through 560
0 0 0 0 0 0 0 0 0 0
Columns 561 through 570
0 0 0 0 0 0 0 0 0 0
Columns 571 through 580
0 0 0 0 0 0 0 0 0 0
Columns 581 through 590
0 0 0 0 0 0 0 0 0 0
Columns 591 through 600
0 0 0 0 0 0 0 0 0 0
Columns 601 through 610
0 0 0 0 0 0 0 0 0 0
Columns 611 through 620
0 0 0 0 0 0 0 0 0 0
Columns 621 through 630
0 0 0 0 0 0 0 0 0 0
Columns 631 through 640
0 0 0 0 0 0 0 0 0 0
Columns 641 through 650
0 0 0 0 0 0 0 0 0 0
Columns 651 through 660
0 0 0 0 0 0 0 0 0 0
Columns 661 through 670
0 0 0 0 0 0 0 0 0 0
Columns 671 through 680
0 0 0 0 0 0 0 0 0 0
Columns 681 through 690
0 0 0 0 0 0 0 0 0 0
Columns 691 through 700
0 0 0 0 0 0 0 0 0 0
Columns 701 through 710
0 0 0 0 0 0 0 0 0 0
Columns 711 through 720
0 0 0 0 0 0 0 0 0 0
Columns 721 through 730
0 0 0 0 0 0 0 0 0 0
Columns 731 through 740
0 0 0 0 0 0 0 0 0 0
Columns 741 through 750
0 0 0 0 0 0 0 0 0 0
Columns 751 through 760
0 0 0 0 0 0 0 0 0 0
Columns 761 through 770
0 0 0 0 0 0 0 0 0 0
Columns 771 through 780
0 0 0 0 0 0 0 0 0 0
Columns 781 through 790
0 0 0 0 0 0 0 0 0 0
Columns 791 through 800
0 0 0 0 0 0 0 0 0 0
Columns 801 through 810
0 0 0 0 0 0 0 0 0 0
Columns 811 through 820
0 0 0 0 0 0 0 0 0 0
Columns 821 through 830
0 0 0 0 0 0 0 0 0 0
Columns 831 through 840
0 0 0 0 0 0 0 0 0 0
Columns 841 through 850
0 0 0 0 0 0 0 0 0 0
Columns 851 through 860
0 0 0 0 0 0 0 0 0 0
Columns 861 through 870
0 0 0 0 0 0 0 0 0 0
Columns 871 through 880
0 0 0 0 0 0 0 0 0 0
Columns 881 through 890
0 0 0 0 0 0 0 0 0 0
Columns 891 through 900
0 0 0 0 0 0 0 0 0 0
Columns 901 through 908
0 0 0 0 0 0 0 0
ans(:,:,2) =
Columns 1 through 10
0 0 0 0 0 0 0 0 0 0
Columns 11 through 20
0 0 0 0 0 0 0 0 0 0
Columns 21 through 30
0 0 0 0 0 0 0 0 0 0
Columns 31 through 40
0 0 0 0 0 0 0 0 0 0
Columns 41 through 50
0 0 0 0 0 0 0 0 0 0
Columns 51 through 60
0 0 0 0 0 0 0 0 0 0
Columns 61 through 70
0 0 0 0 0 0 0 0 0 0
Columns 71 through 80
0 0 0 0 0 0 0 0 0 0
Columns 81 through 90
0 0 0 0 0 0 0 0 0 0
Columns 91 through 100
0 0 0 0 0 0 0 0 0 0
Columns 101 through 110
0 0 0 0 0 0 0 0 0 0
Columns 111 through 120
0 0 0 0 0 0 0 0 0 0
Columns 121 through 130
0 0 2 3 3 3 3 3 1 1
Columns 131 through 140
0 0 0 0 0 0 0 0 0 0
Columns 141 through 150
0 0 0 0 0 0 0 0 0 0
Columns 151 through 160
0 0 0 0 0 0 0 0 0 0
Columns 161 through 170
0 0 0 0 0 0 0 0 0 0
Columns 171 through 180
0 0 0 0 0 0 0 0 0 0
Columns 181 through 190
0 0 0 0 0 0 0 0 0 0
Columns 191 through 200
0 0 0 0 0 0 0 0 0 0
Columns 201 through 210
0 0 0 0 0 0 0 0 0 0
Columns 211 through 220
0 0 0 0 0 0 0 0 0 0
Columns 221 through 230
0 0 0 0 0 0 0 0 0 0
Columns 231 through 240
0 0 0 0 0 0 0 0 0 0
Columns 241 through 250
0 0 0 0 0 0 0 0 0 0
Columns 251 through 260
0 0 0 0 0 0 0 0 0 0
Columns 261 through 270
0 0 0 0 0 0 0 0 0 0
Columns 271 through 280
0 0 0 0 0 0 0 0 0 0
Columns 281 through 290
0 0 0 0 0 0 0 0 0 0
Columns 291 through 300
0 0 0 0 0 0 0 0 0 0
Columns 301 through 310
0 0 0 0 0 0 0 0 0 0
Columns 311 through 320
0 0 0 0 0 0 0 0 0 0
Columns 321 through 330
0 0 0 0 0 0 0 0 0 0
Columns 331 through 340
0 0 0 0 0 0 0 0 0 0
Columns 341 through 350
0 0 0 0 0 0 0 0 0 0
Columns 351 through 360
0 0 0 0 0 0 0 0 0 0
Columns 361 through 370
0 0 0 0 0 0 0 0 0 0
Columns 371 through 380
0 0 0 0 0 0 0 0 0 0
Columns 381 through 390
0 0 0 0 0 0 0 0 0 0
Columns 391 through 400
0 0 0 0 0 0 0 0 0 0
Columns 401 through 410
0 0 0 0 0 0 0 0 0 0
Columns 411 through 420
0 0 0 0 0 0 0 0 0 0
Columns 421 through 430
0 0 0 0 0 0 0 0 0 0
Columns 431 through 440
0 0 0 0 0 0 0 0 0 0
Columns 441 through 450
0 0 0 0 0 0 0 0 0 0
Columns 451 through 460
0 0 0 0 0 0 0 0 0 0
Columns 461 through 470
0 0 0 0 0 0 0 0 0 0
Columns 471 through 480
0 0 0 0 0 0 0 0 0 0
Columns 481 through 490
0 0 0 0 0 0 0 0 0 0
Columns 491 through 500
0 0 0 0 0 0 0 0 0 0
Columns 501 through 510
0 0 0 0 0 0 0 0 0 0
Columns 511 through 520
0 0 0 0 0 0 0 0 0 0
Columns 521 through 530
0 0 0 0 0 0 0 0 0 0
Columns 531 through 540
0 0 0 0 0 0 0 0 0 0
Columns 541 through 550
0 0 0 0 0 0 0 0 0 0
Columns 551 through 560
0 0 0 0 0 0 0 0 0 0
Columns 561 through 570
0 0 0 0 0 0 0 0 0 0
Columns 571 through 580
0 0 0 0 0 0 0 0 0 0
Columns 581 through 590
0 0 0 0 0 0 0 0 0 0
Columns 591 through 600
0 0 0 0 0 0 0 0 0 0
Columns 601 through 610
0 0 0 0 0 0 0 0 0 0
Columns 611 through 620
0 0 0 0 0 0 0 0 0 0
Columns 621 through 630
0 0 0 0 0 0 0 0 0 0
Columns 631 through 640
0 0 0 0 0 0 0 0 0 0
Columns 641 through 650
0 0 0 0 0 0 0 0 0 0
Columns 651 through 660
0 0 0 0 0 0 0 0 0 0
Columns 661 through 670
0 0 0 0 0 0 0 0 0 0
Columns 671 through 680
0 0 0 0 0 0 0 0 0 0
Columns 681 through 690
0 0 0 0 0 0 0 0 0 0
Columns 691 through 700
0 0 0 0 0 0 0 0 0 0
Columns 701 through 710
0 0 0 0 0 0 0 0 0 0
Columns 711 through 720
0 0 0 0 0 0 0 0 0 0
Columns 721 through 730
0 0 0 0 0 0 0 0 0 0
Columns 731 through 740
0 0 0 0 0 0 0 0 0 0
Columns 741 through 750
0 0 0 0 0 0 0 0 0 0
Columns 751 through 760
0 0 0 0 0 0 0 0 0 0
Columns 761 through 770
0 0 0 0 0 0 0 0 0 0
Columns 771 through 780
0 0 0 0 0 0 0 0 0 0
Columns 781 through 790
0 0 0 0 0 0 0 0 0 0
Columns 791 through 800
0 0 0 0 0 0 0 0 0 0
Columns 801 through 810
0 0 0 0 0 0 0 0 0 0
Columns 811 through 820
0 0 0 0 0 0 0 0 0 0
Columns 821 through 830
0 0 0 0 0 0 0 0 0 0
Columns 831 through 840
0 0 0 0 0 0 0 0 0 0
Columns 841 through 850
0 0 0 0 0 0 0 0 0 0
Columns 851 through 860
0 0 0 0 0 0 0 0 0 0
Columns 861 through 870
0 0 0 0 0 0 0 0 0 0
Columns 871 through 880
0 0 0 0 0 0 0 0 0 0
Columns 881 through 890
0 0 0 0 0 0 0 0 0 0
Columns 891 through 900
0 0 0 0 0 0 0 0 0 0
Columns 901 through 908
0 0 0 0 0 0 0 0
ans(:,:,3) =
Columns 1 through 10
0 0 0 0 0 0 0 0 0 0
Columns 11 through 20
0 0 0 0 0 0 0 0 0 0
Columns 21 through 30
0 0 0 0 0 0 0 0 0 0
Columns 31 through 40
0 0 0 0 0 0 0 0 0 0
Columns 41 through 50
0 0 0 0 0 0 0 0 0 0
Columns 51 through 60
0 0 0 0 0 0 0 0 0 0
Columns 61 through 70
0 0 0 0 0 0 0 0 0 0
Columns 71 through 80
0 0 0 0 0 0 0 0 0 0
Columns 81 through 90
0 0 0 0 0 0 0 0 0 0
Columns 91 through 100
0 0 0 0 0 0 0 0 0 0
Columns 101 through 110
0 0 0 0 0 0 0 0 0 0
Columns 111 through 120
0 0 0 0 0 0 0 0 0 0
Columns 121 through 130
0 0 0 0 0 0 0 0 0 0
Columns 131 through 140
0 0 0 0 0 0 0 0 0 0
Columns 141 through 150
0 0 0 0 0 0 0 0 0 0
Columns 151 through 160
0 0 0 0 0 0 0 0 0 0
Columns 161 through 170
0 0 0 0 0 0 0 0 0 0
Columns 171 through 180
0 0 0 0 0 0 0 0 0 0
Columns 181 through 190
0 0 0 0 0 0 0 0 0 0
Columns 191 through 200
0 0 0 0 0 0 0 0 0 0
Columns 201 through 210
0 0 0 0 0 0 0 0 0 0
Columns 211 through 220
0 0 0 0 0 0 0 0 0 0
Columns 221 through 230
0 0 0 0 0 0 0 0 0 0
Columns 231 through 240
0 0 0 0 0 0 0 0 0 0
Columns 241 through 250
0 0 0 0 0 0 0 0 0 0
Columns 251 through 260
0 0 0 0 0 0 0 0 0 0
Columns 261 through 270
0 0 0 0 0 0 0 0 0 0
Columns 271 through 280
0 0 0 0 0 0 0 0 0 0
Columns 281 through 290
0 0 0 0 0 0 0 0 0 0
Columns 291 through 300
0 0 0 0 0 0 0 0 0 0
Columns 301 through 310
0 0 0 0 0 0 0 0 0 0
Columns 311 through 320
0 0 0 0 0 0 0 0 0 0
Columns 321 through 330
0 0 0 0 0 0 0 0 0 0
Columns 331 through 340
0 0 0 0 0 0 0 0 0 0
Columns 341 through 350
0 0 0 0 0 0 0 0 0 0
Columns 351 through 360
0 0 0 0 0 0 0 0 0 0
Columns 361 through 370
0 0 0 0 0 0 0 0 0 0
Columns 371 through 380
0 0 0 0 0 0 0 0 0 0
Columns 381 through 390
0 0 0 0 0 0 0 0 0 0
Columns 391 through 400
0 0 0 0 0 0 0 0 0 0
Columns 401 through 410
0 0 0 0 0 0 0 0 0 0
Columns 411 through 420
0 0 0 0 0 0 0 0 0 0
Columns 421 through 430
0 0 0 0 0 0 0 0 0 0
Columns 431 through 440
0 0 0 0 0 0 0 0 0 0
Columns 441 through 450
0 0 0 0 0 0 0 0 0 0
Columns 451 through 460
0 0 0 0 0 0 0 0 0 0
Columns 461 through 470
0 0 0 0 0 0 0 0 0 0
Columns 471 through 480
0 0 0 0 0 0 0 0 0 0
Columns 481 through 490
0 0 0 0 0 0 0 0 0 0
Columns 491 through 500
0 0 0 0 0 0 0 0 0 0
Columns 501 through 510
0 0 0 0 0 0 0 0 0 0
Columns 511 through 520
0 0 0 0 0 0 0 0 0 0
Columns 521 through 530
0 0 0 0 0 0 0 0 0 0
Columns 531 through 540
0 0 0 0 0 0 0 0 0 0
Columns 541 through 550
0 0 0 0 0 0 0 0 0 0
Columns 551 through 560
0 0 0 0 0 0 0 0 0 0
Columns 561 through 570
0 0 0 0 0 0 0 0 0 0
Columns 571 through 580
0 0 0 0 0 0 0 0 0 0
Columns 581 through 590
0 0 0 0 0 0 0 0 0 0
Columns 591 through 600
0 0 0 0 0 0 0 0 0 0
Columns 601 through 610
0 0 0 0 0 0 0 0 0 0
Columns 611 through 620
0 0 0 0 0 0 0 0 0 0
Columns 621 through 630
0 0 0 0 0 0 0 0 0 0
Columns 631 through 640
0 0 0 0 0 0 0 0 0 0
Columns 641 through 650
0 0 0 0 0 0 0 0 0 0
Columns 651 through 660
0 0 0 0 0 0 0 0 0 0
Columns 661 through 670
0 0 0 0 0 0 0 0 0 0
Columns 671 through 680
0 0 0 0 0 0 0 0 0 0
Columns 681 through 690
0 0 0 0 0 0 0 0 0 0
Columns 691 through 700
0 0 0 0 0 0 0 0 0 0
Columns 701 through 710
0 0 0 0 0 0 0 0 0 0
Columns 711 through 720
0 0 0 0 0 0 0 0 0 0
Columns 721 through 730
0 0 0 0 0 0 0 0 0 0
Columns 731 through 740
0 0 0 0 0 0 0 0 0 0
Columns 741 through 750
0 0 0 0 0 0 0 0 0 0
Columns 751 through 760
0 0 0 0 0 0 0 0 0 0
Columns 761 through 770
0 0 0 0 0 0 0 0 0 0
Columns 771 through 780
0 0 0 0 0 0 0 0 0 0
Columns 781 through 790
0 0 0 0 0 0 0 0 0 0
Columns 791 through 800
0 0 0 0 0 0 0 0 0 0
Columns 801 through 810
0 0 0 0 0 0 0 0 0 0
Columns 811 through 820
0 0 0 0 0 0 0 0 0 0
Columns 821 through 830
0 0 0 0 0 0 0 0 0 0
Columns 831 through 840
0 0 0 0 0 0 0 0 0 0
Columns 841 through 850
0 0 0 0 0 0 0 0 0 0
Columns 851 through 860
0 0 0 0 0 0 0 0 0 0
Columns 861 through 870
0 0 0 0 0 0 0 0 0 0
Columns 871 through 880
0 0 0 0 0 0 0 0 0 0
Columns 881 through 890
0 0 0 0 0 0 0 0 0 0
Columns 891 through 900
0 0 0 0 0 0 0 0 0 0
Columns 901 through 908
0 0 0 0 0 0 0 0
sum(count_matrix(1:4, 122:131,2))
ans =
0 2 3 3 3 3 3 1 1 0
sum(sum(count_matrix(1:4, 122:131,2)))
ans =
19
count_matrix(1:4, 122:131,2)
ans =
0 1 1 1 1 1 1 0 0 0
0 1 1 1 1 1 1 1 1 0
0 0 1 1 1 1 1 0 0 0
0 0 0 0 0 0 0 0 0 0
imshow(im2(1:4,122:131,:))
clear
close all
clc
disp('grouping data');
grouping data
empName = 'Joe'
empName =
Joe
empPayRate = 12.34
empPayRate =
12.3400
empHoursWorked = 40
empHoursWorked =
40
emp{1} = 'Joe'
emp =
'Joe'
emp{2} = 12.34
emp =
'Joe' [12.3400]
emp{3} = 40
emp =
'Joe' [12.3400] [40]
emp
emp =
'Joe' [12.3400] [40]
disp('cells are one way');
cells are one way
disp('structures are another way');
structures are another way
s.name = 'Joe'
s =
name: 'Joe'
s.payRate = 12.34
s =
name: 'Joe'
payRate: 12.3400
s.hoursWorked = 40
s =
name: 'Joe'
payRate: 12.3400
hoursWorked: 40
s
s =
name: 'Joe'
payRate: 12.3400
hoursWorked: 40
emp
emp =
'Joe' [12.3400] [40]
S = getgenbank('M10051');
S
S =
LocusName: 'HUMINSR'
LocusSequenceLength: '4723'
LocusNumberofStrands: ''
LocusTopology: 'linear'
LocusMoleculeType: 'mRNA'
LocusGenBankDivision: 'PRI'
LocusModificationDate: '06-JAN-1995'
Definition: 'Human insulin receptor mRNA...'
Accession: 'M10051'
Version: 'M10051.1'
GI: ''
Project: []
DBLink: []
Keywords: 'insulin receptor; tyrosine ...'
Segment: []
Source: 'Homo sapiens (human)'
SourceOrganism: [4x65 char]
Reference: {[1x1 struct]}
Comment: [14x67 char]
Features: [50x74 char]
CDS: [1x1 struct]
Sequence: 'ggggggctgcgcggccgggtcggtgcg...'
SearchURL: 'http://www.ncbi.nlm.nih.gov...'
RetrieveURL: 'http://eutils.ncbi.nlm.nih....'
S.Definition
ans =
Human insulin receptor mRNA, complete cds.
disp(S.Definition)
Human insulin receptor mRNA, complete cds.
data = S.Sequence;
whos
Name Size Bytes Class Attributes
S 1x1 34592 struct
ans 1x42 84 char
data 1x4723 9446 char
emp 1x3 358 cell
empHoursWorked 1x1 8 double
empName 1x3 6 char
empPayRate 1x1 8 double
s 1x1 550 struct
S
S =
LocusName: 'HUMINSR'
LocusSequenceLength: '4723'
LocusNumberofStrands: ''
LocusTopology: 'linear'
LocusMoleculeType: 'mRNA'
LocusGenBankDivision: 'PRI'
LocusModificationDate: '06-JAN-1995'
Definition: 'Human insulin receptor mRNA...'
Accession: 'M10051'
Version: 'M10051.1'
GI: ''
Project: []
DBLink: []
Keywords: 'insulin receptor; tyrosine ...'
Segment: []
Source: 'Homo sapiens (human)'
SourceOrganism: [4x65 char]
Reference: {[1x1 struct]}
Comment: [14x67 char]
Features: [50x74 char]
CDS: [1x1 struct]
Sequence: 'ggggggctgcgcggccgggtcggtgcg...'
SearchURL: 'http://www.ncbi.nlm.nih.gov...'
RetrieveURL: 'http://eutils.ncbi.nlm.nih....'
whos
Name Size Bytes Class Attributes
S 1x1 34592 struct
ans 1x42 84 char
data 1x4723 9446 char
emp 1x3 358 cell
empHoursWorked 1x1 8 double
empName 1x3 6 char
empPayRate 1x1 8 double
s 1x1 550 struct
emp
emp =
'Joe' [12.3400] [40]
emp{2}{1} = 'Jane'
{Cell contents assignment to a non-cell array object.
}
emp(2){1} = 'Jane'
{Error: ()-indexing must appear last in an index expression.
}
empA = {'John Doe', 26, 8.75, false, 5};
empB = {'Jane Smith', 43, 21.10, true, -1};
empA
empA =
'John Doe' [26] [8.7500] [0] [5]
empB
empB =
'Jane Smith' [43] [21.1000] [1] [-1]
whos
Name Size Bytes Class Attributes
S 1x1 34592 struct
ans 1x42 84 char
data 1x4723 9446 char
emp 1x3 358 cell
empA 1x5 601 cell
empB 1x5 605 cell
empHoursWorked 1x1 8 double
empName 1x3 6 char
empPayRate 1x1 8 double
s 1x1 550 struct
emps = {empA, empB}
emps =
{1x5 cell} {1x5 cell}
emps
emps =
{1x5 cell} {1x5 cell}
whos
Name Size Bytes Class Attributes
S 1x1 34592 struct
ans 1x42 84 char
data 1x4723 9446 char
emp 1x3 358 cell
empA 1x5 601 cell
empB 1x5 605 cell
empHoursWorked 1x1 8 double
empName 1x3 6 char
empPayRate 1x1 8 double
emps 1x2 1430 cell
s 1x1 550 struct
emps{1}
ans =
'John Doe' [26] [8.7500] [0] [5]
emps{2}
ans =
'Jane Smith' [43] [21.1000] [1] [-1]
emps{2}{1}
ans =
Jane Smith
emps{1}
ans =
'John Doe' [26] [8.7500] [0] [5]
emps{1}{1:2}
ans =
John Doe
ans =
26
emps{1}{2}
ans =
26
emps{1}{2} = 'hello'
emps =
{1x5 cell} {1x5 cell}
emps{1}{1:2}
ans =
John Doe
ans =
hello
emps{2}{1:2}
ans =
Jane Smith
ans =
43
whos
Name Size Bytes Class Attributes
S 1x1 34592 struct
ans 1x1 8 double
data 1x4723 9446 char
emp 1x3 358 cell
empA 1x5 601 cell
empB 1x5 605 cell
empHoursWorked 1x1 8 double
empName 1x3 6 char
empPayRate 1x1 8 double
emps 1x2 1432 cell
s 1x1 550 struct
s
s =
name: 'Joe'
payRate: 12.3400
hoursWorked: 40
s(2).name = 'Jane'
s =
1x2 struct array with fields:
name
payRate
hoursWorked
s
s =
1x2 struct array with fields:
name
payRate
hoursWorked
s(1)
ans =
name: 'Joe'
payRate: 12.3400
hoursWorked: 40
s(2)
ans =
name: 'Jane'
payRate: []
hoursWorked: []
s(2).payRate = s(1).payRate + 1;
s
s =
1x2 struct array with fields:
name
payRate
hoursWorked
s(2)
ans =
name: 'Jane'
payRate: 13.3400
hoursWorked: []
s(2).hoursWorked = 35;
s(2).sickLeave = 7;
s
s =
1x2 struct array with fields:
name
payRate
hoursWorked
sickLeave
s(2).sickLeave
ans =
7
s(1).sickLeave
ans =
[]
s(1).sickLeaves
{Reference to non-existent field 'sickLeaves'.
}
clc
disp('clasdef')
clasdef
disp('classdef')
classdef
edit exampleClass.m
Joe = body
{Undefined function or variable 'body'.
}
Joe = exampleClass
{Error using exampleClass (line 13)
Not enough input arguments.
}
Joe = exampleClass
created
Joe =
exampleClass with properties:
sinuses: []
head: []
stomach: []
disp(Joe.isItUpperResp());
{Error using exampleClass/isItUpperResp
Too many input arguments.
}
Joe.isItUpperResp()
{Error using exampleClass/isItUpperResp
Too many input arguments.
}
Joe.isItUpperResp
{Error using exampleClass/isItUpperResp
Too many input arguments.
}
methods(Joe)
Methods for class exampleClass:
exampleClass isItUpperResp
whos
Name Size Bytes Class Attributes
Joe 1x1 104 exampleClass
S 1x1 34592 struct
ans 0x0 0 double
data 1x4723 9446 char
emp 1x3 358 cell
empA 1x5 601 cell
empB 1x5 605 cell
empHoursWorked 1x1 8 double
empName 1x3 6 char
empPayRate 1x1 8 double
emps 1x2 1432 cell
s 1x2 1102 struct
Joe.isItUpperResp()
{Error using exampleClass/isItUpperResp
Too many input arguments.
}
clear Joe
Joe = exampleClass
created
Joe =
exampleClass with properties:
sinuses: []
head: []
stomach: []
methods(Joe)
Methods for class exampleClass:
exampleClass isItUpperResp
Joe.isItUpperResp()
ans =
1
type exampleClass.m
classdef exampleClass
properties
% Variables
sinuses;
head;
stomach;
end
methods
% constructor
function obj = exampleClass()
% params...
sinuses = true; %params;
head = false;
stomach = false;
disp('created');
end
% Other functions
function yes = isItUpperResp(obj)
yes = true;
end
end
end
diary off