![photo](/responsive_image/150/150/0/0/0/cache/matlabcentral/profiles/8543977_1527114831835_DEF.jpg)
Erfan Pakdamanian
自 2018 起处于活动状态
Followers: 0 Following: 0
Feeds
已回答
Write a function called integerize that takes as its input a matrix A of integers of type double, and returns the name of the “smallest” signed integer class to which A can be converted without loss of information. If no such class exists, the text '
My algorithm may seem to have a little bit more lines than Stephen but it does pretty much the same thing with basic functions ...
Write a function called integerize that takes as its input a matrix A of integers of type double, and returns the name of the “smallest” signed integer class to which A can be converted without loss of information. If no such class exists, the text '
My algorithm may seem to have a little bit more lines than Stephen but it does pretty much the same thing with basic functions ...
6 years 前 | 0
已回答
Write a function called spiral_diag_sum that takes an odd positive integer n as an input and computes the sum of all the elements in the two diagonals of the n-by-n spiral matrix.
function s= spiral_diag_sum(n) sp=spiral(n); s=sum(diag(sp))+sum(diag(fliplr(sp)))-1;
Write a function called spiral_diag_sum that takes an odd positive integer n as an input and computes the sum of all the elements in the two diagonals of the n-by-n spiral matrix.
function s= spiral_diag_sum(n) sp=spiral(n); s=sum(diag(sp))+sum(diag(fliplr(sp)))-1;
6 years 前 | 1