Ask your own question, for FREE!
Mathematics 21 Online
OpenStudy (anonymous):

Consider the array A A = 3 5 -4 -8 -1 33 -17 6 -9 Write a programme that computes the array B by computing the natural logarithm of all the elements of A whose value is no less than 1, and adding 20 to each that is equal to or greater than 1. Do this by using a logical array as a mask. [this should be done using matlab ]

OpenStudy (dape):

I think you will get better help if you post this question in the Computer Science section.

ganeshie8 (ganeshie8):

@UnkleRhaukus

OpenStudy (anonymous):

ok

mathslover (mathslover):

also, : \[\huge{\color{blue}{\mathbb{Welcome}}\space \color{green}{\frak{To}}\space \color{orange}{\textbf{OpenStudy}}}\]

OpenStudy (unklerhaukus):

A=[3,5,-4;-8,-1,33;-17,6,-9]; % array A B=zeros(3,3); % array B (initially empty) for n=1:9 % number of elements if A(n)<1 % when the ellement is less than one B(n)=A(n)+20; % add twenty else % for everything else B(n)=log(A(n)); % take the the natural log end end B % display

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Arriyanalol: i need help
1 day ago 7 Replies 1 Medal
Arriyanalol: CONGRATS to me
1 day ago 8 Replies 2 Medals
Legomaster346: What colleges are good that are near Arab Alabama?
1 week ago 5 Replies 0 Medals
Arriyanalol: i need help
1 week ago 6 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!