Solved


Replace every 3rd element in a vector with 4
x is a vector of undetermined length You are to replace every 3rd element with the number 4, example: x = [11 23 34 43 2 3...

1 month ago

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

1 month ago

Solved


Acid and water
⚖ ⚖ ⚖ ⚖ ⚖ ⚖ ⚖ ⚖ Assume that there is a 100 liter tank. It is initially fi...

1 month ago

Solved


Calculate the height of an object dropped from the sky
Assume that an object is dropped from 1000 meters above the surface of the earth at time t=0. The object is dropped such that t...

1 month ago

Solved


Matlab Basics II - Max & Index of Max
Write a function that takes a vector x, then returns both the max value in x and its location in the vector for example x ...

1 month ago

Solved


Derivative of polynomial
Compute the derivative of a given polynomial. The input is an <http://www.mathworks.com/help/matlab/math/representing-polynomial...

1 month ago

Solved


Matlab Basics - Pick out parts of a vector
Consider x a vector of length >= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, a...

1 month ago

Solved


Find out magnitude of vector
Find out magnitude of vector. Say x=[1 2 3], then answer must sqrt(1^2+2^2+3^2) Please don't use sum function. If you l...

1 month ago

Solved


Determine the length of a string of characters
Determine the length of a string of characters

1 month ago

Solved


Check if equal
Return true if all the elements of an nD array are equal, false otherwise.

1 month ago

Solved


No Twins?
Write a function that accepts as input a vector and returns the same vector, but retaining only the first occurrence of an eleme...

1 month ago

Solved


Remove the positive integers.
Given array x (of integers), remove all the positive numbers and display ouput as y. Example x=[1 -2 3 -4] , output is y=[-2 -...

1 month ago

Solved


Evil Number
Check if a given natural number is evil or not. Read more at <https://oeis.org/A001969 OEIS>.

1 month ago

Solved


Returning a "greater than" vector
Given a vector, v, return a new vector , vNew, containing only values > n. For example: v=[1 2 3 4 5 6] n=3 vNew =...

1 month ago

Solved


Matlab Basics - Logical Tests I
Write a script to test whether a year number is for a leap year or not. eg. x = 1884 output = 1 eg. x = 3 output = 0

1 month ago

Solved


Find triangles from edge
First input is T, a Triplet list of indices -whom each row actually contains the three indices of a triangle vertices-. size(T) ...

1 month ago

Solved


Find a common vertex
First input is T, a triplet list of indices. Second input is i, a single index (positive integer). The goal of this function is ...

1 month ago

Solved


Find edges from a vertex
First input is T, a triplet list of indices. Second input is i, a single index (positive integer). The goal of this function is ...

1 month ago

Solved


Find a common edge
First input is T, a triplet list of indices. Second input is e = [e1 e2], a row vector, couple of indices (positive distinct int...

1 month ago

Solved


Remove duplicated triangles
Input T is a triangulation (triplet list of indices -positive integers-, each index refering to a vertex number in a correspondi...

1 month ago

Solved


Find neighbor triangle indices
First input T is a triangulation (triplet list of indices -positive integers-, each index refering to a vertex number in a corre...

1 month ago

Solved


List every vertices neighbor indices
Input T is a <https://fr.mathworks.com/help/matlab/ref/triangulation.html triangulation>. The purpose of this function is to ...

1 month ago

Solved


List one vertex neighbors
First input T is a triangulation connectivity indices list (triplet list of indices -positive integers-, each index refering to ...

1 month ago

Solved


Build edges list
Input T is a triangulation connectivity indices list (triplet list of indices -positive integers-, each index refering to a vert...

1 month ago

Solved


Remove duplicated vertices
First input V_in is a vertices list (X Y Z coordinates) which may contain duplicata (identical rows). Second input T_in is th...

1 month ago

Solved


Matrix spiral
Make a spiral in a (n*n) matrix. The spiral has to start in the top left, and has to rotate clockwise to the center. The spiral ...

2 months ago

Solved


Better bullseye matrix
<http://www.mathworks.com/matlabcentral/cody/problems/18-bullseye-matrix Problem 18> asks to create a bullseye matrix like this:...

2 months ago

Solved


Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

2 months ago

Solved


ASCII Birthday Cake
Given an age and a name, give draw an ASCII birthday cake. For example, given the name "CODY" and the age 5, return a string wit...

2 months ago

Solved


State of Charge (SoC) Estimation for a Battery
The State of Charge (SoC) of a battery represents its remaining charge as a percentage. It can be calculated using the formula: ...

2 months ago

Load more