In: Computer Science
A = [-1000:1:1000] write a script file that gives the positive numbers greater than 480 and divisible by 3. Hint: Use this command if A(i)>480&&(rem(A(i),3)==0) and indeed, if is always accompanied by an end
___________________________________________________________________
% populare array with number
% ranging from -1000 to 1000
A=[-1000:1:1000];
% positive numbers greater than
% 480 and divisible by 3
B=A(A >480 & rem(A, 3)==0);
% display the numbers which satisfies
% the condition
disp(B)
________________________________________________________________
Columns 1 through 22
483 486 489 492 495 498 501 504 507 510 513 516 519 522 525 528 531 534 537 540 543 546
Columns 23 through 44
549 552 555 558 561 564 567 570 573 576 579 582 585 588 591 594 597 600 603 606 609 612
Columns 45 through 66
615 618 621 624 627 630 633 636 639 642 645 648 651 654 657 660 663 666 669 672 675 678
Columns 67 through 88
681 684 687 690 693 696 699 702 705 708 711 714 717 720 723 726 729 732 735 738 741 744
Columns 89 through 110
747 750 753 756 759 762 765 768 771 774 777 780 783 786 789 792 795 798 801 804 807 810
Columns 111 through 132
813 816 819 822 825 828 831 834 837 840 843 846 849 852 855 858 861 864 867 870 873 876
Columns 133 through 154
879 882 885 888 891 894 897 900 903 906 909 912 915 918 921 924 927 930 933 936 939 942
Columns 155 through 173
945 948 951 954 957 960 963 966 969 972 975 978 981 984 987 990 993 996 999
___________________________________________________________________
Note: If you have
queries or confusion regarding this question, please leave a
comment. I would be happy to help you. If you find it to be useful,
please upvote.