A résolu


Basic commands - Greatest common divisor
Please write a function, which, will put as output greatest common divisor. Example: A = [-5 17; 10 0];...

plus de 9 ans il y a

A résolu


Basics - not so easy division
Please make a function whcih divides x/y, but pay attention for some exceptions with NaN,0,Inf. Sometimes return "ERROR" instead...

plus de 9 ans il y a

A résolu


Basic commands - rounding
make a function which will round to integer, which is nearer to zero. Example x=[-2.5 2]; y=[-2 2];

plus de 9 ans il y a

A résolu


cross in array
Make a cross from "1" in odd size array. Other value from array should be equal to "0"; As input you get length of side of arra...

plus de 9 ans il y a

A résolu


Basic commands - Least common multiple
Make a function which will return least common multiple of "a" and "b" Example: a=8; b=6; y=24;

plus de 9 ans il y a

A résolu


Basic commands - amount of inputs
Make a function, which will return amount of given inputs Example: amountinput(1,2,4,3,10) -> 5 , because we gave functio...

plus de 9 ans il y a

A résolu


BASICS - sum part of vector
Please make a function, where as input you get vector "x" and and vector "c", where in "c" vector you get indexes to sum. Examp...

plus de 9 ans il y a

A résolu


Counting candies
In a classroom of |'n'| children, every even numbered child gets one big candy and every odd numbered child gets two small candi...

plus de 9 ans il y a

A résolu


Euclidean distance from a point to a polynomial
A not uncommon problem in the area of computational geometry is to find the closest point to a straight line from a given point,...

plus de 9 ans il y a

Question


Number of leading zeroes as a variable
I know that to print out a number with a certain amount of leading zeroes, you are supposed to use %0X, where X is the number of...

plus de 9 ans il y a | 2 réponses | 0

2

réponses

Réponse apportée
reshape 4D matrix into 2D matrix
Does this do what you're looking for? reshape(squeeze(x(:,1,:,:)),25,30) where x is your 5x5x5x30 matrix?

presque 10 ans il y a | 0

Question


Copying Profile results into Word/Excel
I recently spent a full day running a large amount of simulations of a code through the MATLAB Profiler to see where things need...

presque 10 ans il y a | 1 réponse | 0

1

réponse

A résolu


Weighted Convolution
Given two input vectors x = [x_1, x_2, ..., x_K] and y = [y_1, y_2, ..., y_K] of equal length, compute the weighted convolution ...

presque 10 ans il y a

A résolu


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

presque 10 ans il y a

A résolu


Some tweaks in summation, Can you decode? :)
There are some tweaks in summation that you might observe via test suites Try if you can

presque 10 ans il y a

A résolu


Stubborn guy
In a vote, the stubborn guy always votes differently. for example if the other vote is: x=true then he votes false

presque 10 ans il y a

A résolu


BaeIsAlwaysRight
Output yes whatever bae says

presque 10 ans il y a

A résolu


Odd times 3
Given a input matrix x, multiply all odd values by 3. Even values remain the same. example: x = [1 2 3 4 5;... 6 7...

presque 10 ans il y a

A résolu


Non trivial identities - summation
Return x by adding a random number to it.

presque 10 ans il y a

A résolu


Non trivial identities - flipping
Return x by flipping it.

presque 10 ans il y a

A résolu


Non trivial identities - differentiation
Return x by differentiating it.

presque 10 ans il y a

A résolu


angle in regular polygon
Make a function which returns measure of interior angle in x-side regular polygon. x is as input. Please pay attention, that 1 ...

presque 10 ans il y a

A résolu


Create a constant offset.
Add a constant offset to an array. For example: a=[1 3 5 9]; offset=2; y=[3 5 7 11];

presque 10 ans il y a

A résolu


Geometrical meaning of determinant
Given two vectors x,y, in 2D or three vectors x,y,z in 3D space, compute the area (or volume) of the parallelogram they define. ...

presque 10 ans il y a

A résolu


Find the diagonal of the square of side L
You are given a square of side length L, find D the length of its diagonal.

presque 10 ans il y a

A résolu


Area of polygon
Given the vertices in vectors X,Y, return the area of the polygon they define.

presque 10 ans il y a

A résolu


Upper Matrix in LU Decompositon
Get the Upper Matrix of the Matrix Given Please have a pride on not using built-in Matlab functions :)

presque 10 ans il y a

A résolu


Convert decimal to hex as shown in test cases
Convert decimal to hex as shown in test cases.

presque 10 ans il y a

A résolu


Polynomial evaluation
Compute the value of a polynomial of degree n with coeffcients in vector a, at value x. p(x)=a(1)+a(2)x+a(3)x^2+...+a(n+1)x...

presque 10 ans il y a

A résolu


Iterative sum of digits of 2^n number
Given n, calculate the number 2^n (where n>=0) and *iterate* until the sum of the digits is a single-digit number. Example: ...

presque 10 ans il y a

Charger plus