tag:blogger.com,1999:blog-9101701713138538731.post1024154970372226533..comments2023-10-12T12:25:36.938-03:00Comments on How to Use Scilab: Vectors and Matrices - 4Alex Carneirohttp://www.blogger.com/profile/14503428177777397005noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-9101701713138538731.post-45656838191995712452013-02-08T13:28:37.426-03:002013-02-08T13:28:37.426-03:00Hi Alex! This is a great solution. Thank you very ...Hi Alex! This is a great solution. Thank you very much!Peterhttps://www.blogger.com/profile/08044103012321274704noreply@blogger.comtag:blogger.com,1999:blog-9101701713138538731.post-17133384543709347332013-02-07T15:13:20.657-03:002013-02-07T15:13:20.657-03:00Hello Peter, you can try something like this:
a =...Hello Peter, you can try something like this:<br /><br />a = [ 1 2 3 4 11 20 10 ];<br /><br />aux_positions = find(a > 9);<br /><br />b = a(aux_positions);<br /><br />b = b - 10;<br /><br />a(aux_positions) = b;<br /><br /><br />Best regards.<br />Alex Carneirohttps://www.blogger.com/profile/14503428177777397005noreply@blogger.comtag:blogger.com,1999:blog-9101701713138538731.post-90786489358416128002013-02-07T14:59:25.299-03:002013-02-07T14:59:25.299-03:00a = [ 1 2 3 4 11 20 10 ]
b = a>9
What is the s...a = [ 1 2 3 4 11 20 10 ]<br />b = a>9<br /><br />What is the smart way of subtract 10 from each column that has a value over 9? I'm looking for a matrice operation to avoid loops... Is it possible?<br /><br />Thank you!Peterhttps://www.blogger.com/profile/08044103012321274704noreply@blogger.com