krushnasamy subramaniyan
SRM UNIVERSITY
Followers: 0 Following: 0
Feeds
提问
Write a function called bell that returns the first n rows of the Bell triangle, where n is an input argument.The function must return an n-by-n array where the top left triangle contains the Bell triangle with each row of the Bell triangle positione
n = 7; a = zeros(n); a(1) = 1; for k = 1:n-1 a(k+1,1:k+1) = cumsum(a(k,[k,1:k]),2); end
9 years 前 | 0 个回答 | 0
0
个回答提问
Write a function called maxsubsum that takes a matrix A as an input, computes the sum of elements in each of its submatrices, and finds the submatrix that has the maximum sum. If there are more than one with the same maximum sum, the function can pic
[rows, columns] = size(A); overallMaxSum = -inf; for smColumns = 1 : columns for smRows = 1 : rows sum...
9 years 前 | 0 个回答 | 0
0
个回答提问
Write a function called prime_pairs that returns the smallest prime number p smaller than 100,000 such that (p + n) is also prime, where n is a scalar integer and is the sole input argument to the function. If no such number exists, then the function
function pr=prime(n) np=1;c=0; pr=zeros(1,n); while np<=n if isprime(np) c=c+1; ...
9 years 前 | 0 个回答 | 0
0
个回答提问
*** Write a function called roman2 that takes a string input representing an integer between 1 and 399 inclusive using Roman numerals and returns the Arabic equivalent as a uint16. If the input is illegal, or its value is larger than 399, roman2 retu
function num = roman(rom) romans = { 'I' 'II' 'III' 'IV' 'V' 'VI' 'VII' 'VIII' 'IX' 'X' ... 'XI' 'XII' 'XIII...
9 years 前 | 1 个回答 | 0
1
个回答提问
Write a function called sparse_array_in that reads a two-dimensional array of doubles from a binary file whose name is provided by the single input argument of the function. The format of the file is specified in the previous problem. The function re
hai friends if you have any hint to solve the coding help me. thanks
9 years 前 | 1 个回答 | 0
1
个回答提问
Write a function called bell that returns the first n rows of the Bell triangle, where n is an input argument. The function must return an n-by-n array where the the top left triangle contains the Bell triangle with each row of the Bell triangle posi
"Write a function called bell that returns the first n rows of the Bell triangle, where n is an input argument. For a precise de...
9 years 前 | 2 个回答 | 0
2
个回答提问
Write a function called censor whose first input argument is a cell vector (row or column) of strings and whose second input argument is a string. It removes each element of the cell vector whose string is either identical to the second input argumen
str={'hi' 'me' 'if' {'yes' 'no' 'hi'} {'for' 'while' 'all'} 'hi'}; %example element='hi'; %remove 'hi' str(strcmp(str,element)...
9 years 前 | 0 个回答 | 0
0
个回答提问
Cell Array of Strings function help
Write a function called censor whose first input argument is a cell vector (row or column) of strings and whose second input arg...
9 years 前 | 0 个回答 | 0
0
个回答提问
Write a function called roman that takes a string representing an integer between 1 and 20 inclusive using Roman numerals and returns the Arabic equivalent as a number of type uint8. If the input is illegal or its value is larger than 20, roman retur
Write a function called roman that takes a string representing an integer between 1 and 20 inclusive using Roman numerals and re...
9 years 前 | 1 个回答 | 0