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:...
8년 초과 전
문제를 풀었습니다
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...
8년 초과 전
문제를 풀었습니다
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...
8년 초과 전
문제를 풀었습니다
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 ...
8년 초과 전
질문
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
8년 초과 전 | 답변 수: 0 | 0
0
답변질문
it doesn't work .so,what is the problem?
function w= flip_it(v) w = v(end:-1:1); end
8년 초과 전 | 답변 수: 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
8년 초과 전 | 답변 수: 1 | 0

