A résolu


Generate pi using logarithm
Generate pi using logarithm

plus de 10 ans il y a

A résolu


Sum the elements in either diagonal of a square matrix
Sum the elements of a square matrix that lie on either the major diagonal or anti-diagonal.

plus de 10 ans il y a

A résolu


Vectorizing, too easy or too hard?
Please insert a . before any ^, * or / in the string. That's it!!

plus de 10 ans il y a

A résolu


collision
several cars (n) were involved in this collision, the input matrix (vm) has n rows and two columns, first column for velocity an...

plus de 10 ans il y a

A résolu


Find matching parenthesis
One of the most indispensable things about a great text editor for programming is the ability to quickly jump between matching p...

plus de 10 ans il y a

A résolu


Cody Matlab Version
What is the current Cody Matlab Release? *Output:* string *Examples:* '(R2012a)' or 'R2012a' Hint: We have mo...

plus de 10 ans il y a

A résolu


Find nearest prime number less than input number
Find nearest prime number less than input number . For example: if the input number is 125, then the nearest prime number whi...

plus de 10 ans il y a

A résolu


Sum the entries of each column of a matrix which satisfy a logical condition.
Given a numeric matrix A and a logical array L of the same size as A, return a row vector S containing the columnwise sums of th...

plus de 10 ans il y a

A résolu


Are all the three given point in the same line?
In this problem the input is the coordinate of the three points in a XY plane? P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) how can...

plus de 10 ans il y a

A résolu


Find the position of first minimum value in an integer array with numbers
If x = [2 6 4 9 10 3 1 5 1] the the output should be 7, because the first minimum value (1) lies at the 7th position.

plus de 10 ans il y a

A résolu


Angle between Two Vectors
The dot product relationship, a dot b = | a | | b | cos(theta), can be used to determine the acute angle between vector a and ve...

plus de 10 ans il y a

A résolu


Saving MATLAB session to a file
How to save MATLAB session to a file?

plus de 10 ans il y a

A résolu


Find nth maximum
Find nth maximum in a vector of integer numbers. Return NaN if no such number exists. x = [2 6 4 9 -10 3 1 5 -10]; So ...

plus de 10 ans il y a

A résolu


Symmetric matrix
You must create a n-by-n *symmetric* matrix such that A(row,col) = row/col for col >= row. Example if n =3 : output is : ...

plus de 10 ans il y a

A résolu


Integer or Float?
Test an input to see whether it is an integer or a floating point number. If it is an integer return 1 for 'true'. Otherwise ret...

plus de 10 ans il y a

A résolu


Return the Nth Output from an Input Command
*Description* Given _F_, a cell array whose first element is a function handle and subsequent elements are arguments, return ...

plus de 10 ans il y a

A résolu


Hard limit function
Classify x data as if x>=0 then y=1 if x<0 then y=0 Example x = [ -2 -1 0 1 2] y = [ 0 0 1 1 1]

plus de 10 ans il y a

A résolu


Multiply by 3
Given the variable x as your input, multiply it by three and put the result in y.

plus de 10 ans il y a

A résolu


Matlab Basics - Assigning Variables
Assign different types of data to variables: integer, double, and strings Example: A is a double, for example 2.34 B is a...

plus de 10 ans il y a

A résolu


Let's get back to school, and create multiplication tables
For a given range, create multiplication tables. (start is always < endno) Example start = 17 endno = 19 Then, ...

plus de 10 ans il y a

A résolu


Factorial !
Calculate the factorial of a non-negative integer without using the built in function *factorial*

plus de 10 ans il y a

A résolu


square number
Square a number

plus de 10 ans il y a

A résolu


What is Sum Of all elements of Matrix
Given the matrix x, return the sum of all elements of matrix. Example: Input x = [ 1 2 0 0 0 0 6 9 3 3 ] ...

plus de 10 ans il y a

A résolu


Wilf-Zeilberger pairs
Take as inputs two functions _F_ and _G_, and two scalar values _n_ and _k_. Test whether the functions are candidates to be a W...

plus de 10 ans il y a

A résolu


Determine if input is a Narcissistic number
<http://en.wikipedia.org/wiki/Narcissistic_number Narcissistic number> is a number that is the sum of its own digits each raised...

plus de 10 ans il y a

A résolu


Times 3 problem
When you enter the number, it should return the number multiplied by 3

plus de 10 ans il y a

A résolu


Array of Ones
Create a 100 X 100 array of ones.

plus de 10 ans il y a

A résolu


Matlab Basics II - Create a vector with a repeated entry
Create a row vector of length n, filled with 4's, for example, if n = 3 output = [4 4 4] make sure to round UP when n is a...

plus de 10 ans il y a

A résolu


Half-Swap
Given a vector with an even number of elements, rearrange it so that the elements in its first half are switched with those i...

plus de 10 ans il y a

A résolu


Matlab Basics II - squares
Write a function that takes matrix A, and squares each element in the matrix example: A = [1 2 3] output = [1 4 9]

plus de 10 ans il y a

Charger plus