Solved


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

12 years ago

Solved


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

12 years ago

Solved


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]

12 years ago

Solved


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

12 years ago

Solved


inner product of two vectors
inner product of two vectors

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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;

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Answered
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(:)'

12 years ago | 0

| accepted

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

12 years ago | 0

| accepted

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

12 years ago | 1

| accepted

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

12 years ago | 0

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

12 years ago | 0

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

12 years ago | 1

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

12 years ago | 0

| accepted

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

12 years ago | 0

Load more