Solved


Find the Nth Root of a Given Number
Find the Nth root of a given number x. Examples x = 4096 n = 4 y = 8 x = 625 n = 5 y = 3.6239

11 years ago

Solved


Generate this matrix
For a given odd integer n, generate a matrix as follows: Input: n = 5; Output: [ 2 1 0 0 0 1 ...

11 years ago

Solved


Fermat's last theorem - again
For a given integer n, express it as a sum of two squares if possible. Return empty matrix otherwise. Solution may not be unique...

11 years ago

Answered
how to compute separate line 2 dimensional points
Given X and Y, this function will give you your 'w' and 'b' function [a b] = droite_reg(X,Y) % Linear fitting % Y = a +...

11 years ago | 0

Solved


ZigZag matrix with reflected format
ZigZag MATRIX with REFLECTED format. We have only input x. We have to create a matrix in the following pattern. input n=5...

11 years ago

Answered
Finding indices of array that has a constraint
example: vector B=[1:10] Constraint: greater than 5 idx=find(B>5)% will give you the indices satisfying the constraint...

11 years ago | 0

Answered
How do I calculate an inverse engine torque map from an engine torque map?
RPM=[500 1000 1500 2000]'; alpha_throttle=[0.1 0.2 0.4 0.8]; torque_map= [67 89 95 108 74 92 11...

11 years ago | 0

Solved


Convert a vector into numbers
Suppose a vector x = [ 1 2 4 7] is given. You have to convert this vector into string number y = '1247'. Examples x = [ 1...

11 years ago

Answered
cut figure I want to see
im not sure i understand what you're asking for but this might help plot(rand(1,10)) xlim([3 4]) ylim([0.7 0.8]) ...

12 years ago | 0

Answered
Sum every i-th column in matrix seperately
Try sum(A(:,[1 4])) where A is your random matrix.The line above will give you the sums of column 1 and 4. ex: A=spiral(4...

12 years ago | 0

| accepted

Answered
display extra value in datacursor
Data cursor has a callback function that can be found like this: on your plot: 1)click on the data cursor 2)Right click on ...

12 years ago | 0

Solved


Integer Sequence - 1
Check the test suite to determine the relationship between input integer scalar and output integer scalar.

12 years ago

Solved


Sort the vector with the given index
Given x = [1 2 4 8 17] and t = [1 3 2 5 4] then y = [1 4 2 17 8].

12 years ago

Solved


Simulating the selection of a state with given probabilities
Lets say we have 3 different states [1,2,3] with the probabilities of occurrences of each state is given as [0.5 0.2 0.3]. Which...

12 years ago

Solved


Sum of the Matrix Elements
Add up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns. E...

12 years ago

Solved


Elements with highest local average
Input v is a row vector such that length(v)>3. Consider a sliding window of length 3 that is used to calculate the local average...

12 years ago

Solved


row-th maximum row elements
Input a is a square matrix of size n*n. Output vector v is of size 1*n. The ith element of output v is the ith largest element o...

12 years ago

Solved


Path calculation with polynomials
Let a vector x be the input to our function. 1. If a value of an input vector element x is lower than 0, set this value to 0....

12 years ago

Solved


Numbers spiral diagonals (Part 1)
Inspired by Project Euler n°28 et 58. A n x n spiral matrix is obtained by starting with the number 1 and moving to the right...

12 years ago

Solved


Find maximum value of a curve
Two vectors shall be already defined: - Input vector x (e.g. x = 0:1:10) - Result vector y (e.g. y = sin(x)) Create a n...

12 years ago

Solved


Sum of big primes without primes
Inspired by Project Euler n°10 (I am quite obviously a fan). With problem n°250 by Doug, you can find some global methods to ...

12 years ago

Solved


Center of mass
Given a matrix M(m,n), where m is the number of vertices of the geometrical element and n is 2 or 3 (2D-plane figure or 3D-solid...

12 years ago

Solved


NO _________ ALLOWED....
So you're given a sentence where if there is a particular word in the sentence then the output is 1, if it is not there then the...

12 years ago

Solved


random picture with random colours
write a function which creates a random(x,y) matrix with random RGB colours for example create_pic(5,5) gives us a 3d matrix. ...

12 years ago

Solved


Find the number that has most primes those less than it
Given an vector x of integer numbers, find the element of x that has the most primes less than it.

12 years ago

Solved


Test within tolerance
Given a vector of experimental data, D, and a vector of truth data, T, return FALSE if any +/- errors (D-T) are outside a given ...

12 years ago

Solved


Pandigital number n°1 (Inspired by Project Euler 32)
A little warm-up to begin... An n-digit number is pandigital if it makes use of all the digits 1 to n exactly ONCE. For ex...

12 years ago

Solved


Distance of the centroids of the balls
Given *n* balls of radius *r* and the vector *p (nx3)* with all position *(x,y,z)* of the balls, return the symmetric matrix *A ...

12 years ago

Solved


Vector Magnitude Calculator
'a' is a vector that starts at the origin and ends at (x, y). Find ||a||. Hint: It is as simple as "ABC".

12 years ago

Load more