Risolto


Polynomial division
Divide a polynomial u by polynomial v and return the quotients only. Example: u = x^4+3*x^3+5*x+3 v = x^2+1 Answer: ...

circa 10 anni fa

Risolto


Additive persistence
Inspired by Problem 2008 created by Ziko. In mathematics, the persistence of a number is the *number of times* one must apply...

circa 10 anni fa

Risolto


Calculate circle's property
[A R]=function(r) r is radius, A is area of circles, R is circumference. A=pi*r^2 R=2*pi*r

circa 10 anni fa

Risolto


Extract area
There are observed data c and its location (x,y) x=1:0.1:10 y=1:0.1:10 % x and y are used as inputs [X,Y]=mesh...

circa 10 anni fa

Risolto


Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

circa 10 anni fa

Risolto


Calculate inverse matrix in square matrix
A=eye(3) Calculate inverse matrix of given input. B=function(A) ans = 1 0 0 0 1 0 ...

circa 10 anni fa

Risolto


How to calculate log?
There is a log that have base 5. How to calculate? log5(x)?

circa 10 anni fa

Risolto


Change matrix to vector
Vector is a matrix whose size is 1 x n or n x 1. Change matrix to vector. x = 4 3 5 1 ...

circa 10 anni fa

Risolto


Change matrix to vector2
From x = 4 3 5 1 5 1 To y = 4 3 5 1 ...

circa 10 anni fa

Risolto


Calculate cross product
Make function for cross product a=[1 3 2]; b=[2 4 1]; y=function(a,b) y=[-5 3 -2]

circa 10 anni fa

Risolto


Make random permutation
Make random permutation that consist of random number from 1 to n.

circa 10 anni fa

Risolto


Save variables
a=[1] Save variable a that is located in workspace into current folder. File name should be 'a.mat'

circa 10 anni fa

Risolto


Solve the system of linear equations
4x - 2y +6z=8 2x + 8y +2z=4 6x + 10y +3z=0 Input is each coefficient of polynomial. For example, a=[4 ...

circa 10 anni fa

Risolto


Conduct inner product using given matrix
a=[1 2 3]; b=[3 4 5]; y=function(a,b) Output y should be 26

circa 10 anni fa

Risolto


Print true if
all elements are larger than 5 a=[1 3 5 8 6]; b=[6 6 6 6 6]; function(a) should be false, and function(b) will be tru...

circa 10 anni fa

Risolto


Freebies anyone? No!!!!
Feel free to copy paste all the tests and voila you solved the problem

circa 10 anni fa

Risolto


Try and Catch Simple Example
Try and Catch Simple Example <http://in.mathworks.com/help/matlab/ref/try.html Example> Vector x=[1 4 6 8 10]; Create...

circa 10 anni fa

Risolto


Back to basics 13 - Input variables
Covering some basic topics I haven't seen elsewhere on Cody. Return as a string the name of the input variable to the functio...

circa 10 anni fa

Risolto


Is it a number?
Determine if input is numeric. If it is,output is 1; if it is not, output is 0.

circa 10 anni fa

Risolto


Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

circa 10 anni fa

Risolto


Sum the numbers on the main diagonal
Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

circa 10 anni fa

Risolto


Find max
Find the maximum value of a given vector or matrix.

circa 10 anni fa

Risolto


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

circa 10 anni fa

Risolto


Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

circa 10 anni fa

Risolto


Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....

circa 10 anni fa

Risolto


Program an exclusive OR operation with logical operators
Program an exclusive or operation *without* using the MATLAB function xor. Use logical operators like |, &, ~, ... instead. ...

circa 10 anni fa

Risolto


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

circa 10 anni fa

Risolto


Return the first and last character of a string
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

circa 10 anni fa

Risolto


Back to basics 11 - Max Integer
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive integer MATLAB can handle.

circa 10 anni fa

Risolto


Getting the indices from a matrice
Getting the indices from a matrice. Inspired by Problem 645. Getting the indices from a vector by the great Doug Hull. Given a...

circa 10 anni fa

Carica altro