已解决


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

11 years 前

已解决


Too mean-spirited
Find the mean of each consecutive pair of numbers in the input row vector. For example, x=[1 2 3] ----> y = [1.5 2.5] x=[1...

11 years 前

已解决


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

11 years 前

已解决


Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

11 years 前

已解决


inner product of two vectors
inner product of two vectors

11 years 前

已解决


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

11 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...

11 years 前

已解决


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

11 years 前

已解决


Is my wife right?
Regardless of input, output the string 'yes'.

11 years 前

已解决


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

11 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 ...

11 years 前

已解决


select the primes of a vector
Find the prime numbers in a vector

11 years 前

已解决


CONVERT TAN TO SIN
In a right angle triangle ABC given the tan(A) then find sin(A) For example tan(A)=3/4 then sin(A)=3/5

11 years 前

已解决


find radius of cone
if Slant height of Cone(I)& hight of Cone(H) given then find radius of the Cone(R) for example I=5,h=4 then the ans R=3;

11 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...

11 years 前

已解决


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

11 years 前

已解决


Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

11 years 前

已解决


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

11 years 前

已解决


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

11 years 前

已解决


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

11 years 前

已解决


Add two numbers
Given a and b, return the sum a+b in c.

11 years 前

已解决


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:...

11 years 前

已回答
making a new matrix with the other matrix elements.
Hi. A=[8 11 9 5 10 15]; B=[3*A-2; 3*A-1; 3*A]; B=B(:)'

11 years 前 | 0

| 已接受

已回答
How can I find PSNR values of the denoised image of the SRAD filter.
Hi. Your J is between [0 1]: MSE_W=mean(mean(((double(uint8(I)))-(double(uint8(J.*255)))).^2)); PSNR_W=10*log10(255^2/MS...

11 years 前 | 0

| 已接受

已回答
How to impose a condition creating a matrix.
Hi. With 0:5:100 got out of memory error: n=0:10:100; A=n'; for i=1:9 x=repmat(n,[size(A,1) 1]); A=repm...

11 years 前 | 1

| 已接受

已回答
i am using a for loop to access each element in a column of an xls file and display the data with the help of GUI.my code is:
Hi. Range should be a string: a=xlsread('abc.xls',i,['A' 'num2str(i)']); It's better to read the whole file then use it...

11 years 前 | 0

已回答
Need help writing a for loop
Hi. You don't need for loop to doing this: T = 1; Vm = 1; t = linspace(0, T, 1001) v = (Vm/T)*t with for: ...

11 years 前 | 0

已回答
How to convert non-linear equations to matrix form?
Hi. Maybe sym2poly: syms x C=sym2poly(x^3 - 2*x - 5) poly2sym(C)

11 years 前 | 1

已回答
how loop output store
Hi. What is the size of your price value in each loop: for i=1:n % if it is a number output(i,1)=price; % if i...

11 years 前 | 0

| 已接受

已回答
Code to automatically generate filename from reading cell in an excel file
filename = ['WARNING TEST FILE_C2_2013-02-25'] filename(filename=='-')='_'

11 years 前 | 0

加载更多