Risolto


Generate pi using logarithm
Generate pi using logarithm

oltre 10 anni fa

Risolto


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.

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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.

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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]

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


square number
Square a number

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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]

oltre 10 anni fa

Carica altro