Community Profile

Contact

Top 5% contributor

Does your mxArray happen to contain a Java object? I recently discovered the hard way that calling |mxDestroyArray()| on an mxA...

0

Answered 3 years ago

Based on the original question and replies, it's not clear whether you are calling C code from MATLAB (a MEX file) or executing ...

6049 views

Responded 6 years ago

Model a simple pendulum of length 200cm with bob of mass 100g and plot the position in degrees. The pendulum starts at 30 degree...

Solve this!

1 year ago

Produce a sine wave with amplitude 3: <<http://blogs.mathworks.com/images/seth/cody/sine-eqn.png>>

Produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/add-block-eqn.png>> In this case, the slope of...

Produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/cosine-eqn.png>>

Connect the blocks in the model to produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/connect-blocks...

Return three quarters of n without using addition, subtraction, multiplication or division.

You will be provided with an array or matrix that contains various numbers, in addition to an evening variable, e, set to 1 or 0...

Write a function called man that takes a row vector v as an input and returns a matrix H whose first column consist of the eleme...

Check weather The input is power of n or not? for example x=8,n=2 --> true x=6,n=2 --> false

In mathematics, the look-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, 312211, ...

Factorial of a number x

Create a square matrix of zeros of even order

Regardless of input, output the string 'yes'.

Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

4 years ago

Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...

Rotate input matrix (which will be square) 90 degrees counter-clockwise without using rot90,flipud,fliplr, or flipdim (or eval)....

Calculate the area of a triangle between three points: P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) these three points are the vert...

Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

Return an array of numbers which (effectively) count from 0 to N^M-1 in base N. The result should be returned in a matrix, with ...

Given a collection of points, return the indices of the rows that contain the two points most distant from one another. The inpu...

Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...

Example: in = magic(5) in = 17 24 1 8 15 23 5 7 14 16 4 6 13 20 ...

inner product of two vectors

Given a handle fh to a function which takes a scalar input and returns a scalar output and an integer n >= 1, return a handle f...

<http://en.wikipedia.org/wiki/Benford%27s_law Benford's Law> states that the distribution of leading digits is not random. This...

Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

Load more

Choose your country to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a location from the following list:

See all countries