Feeds
已解决
Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...
9 years 前
已解决
Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...
9 years 前
已解决
Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...
9 years 前
已解决
Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...
9 years 前
提问
Write a function called peri_sum that computes the sum of the elements of an input matrix A that are on the “perimeter” of A. In other words, it adds together the elements that are in the first and last rows and columns. IS MY CODE RIGHT?
function [z]=peri_sum(B) z=sum(B(1,1:end))+sum(B(2:1:end,1))+sum(B(2:1:end,end))+sum(B(end,2:1:end-1)); end
9 years 前 | 0 个回答 | 0
0
个回答提问
it doesn't work .so,what is the problem?
function w= flip_it(v) w = v(end:-1:1); end
9 years 前 | 1 个回答 | 0
1
个回答提问
#what is the problem in the code so that it is not accepted??
function [area,cf]=circle(r) cf=2*pi*r; area=pi*r*r; end
9 years 前 | 1 个回答 | 0

