Solved

Determine Whether an array is empty

Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

fast 5 Jahre ago

Answered

How to add values into Matlab matrix and not overwrite it

You're overwriting the contents of |B| twice in each iteration of your |for| loop: B = zeros(n,1); % preallocate, results ou...

How to add values into Matlab matrix and not overwrite it

You're overwriting the contents of |B| twice in each iteration of your |for| loop: B = zeros(n,1); % preallocate, results ou...

fast 5 Jahre ago | 1

| accepted

Solved

Compute the step response of a DC motor

Compute the step response of a DC motor shown below <<http://blogs.mathworks.com/images/seth/cody/dc-motor.png>> The param...

fast 5 Jahre ago

Solved

Make a low pass filter

Make a first order low pass filter that will filter out the high frequency oscillations for the given input signal. The cut-off ...

fast 5 Jahre ago

Solved

Generate N equally spaced intervals between -L and L

Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments. F...

fast 5 Jahre ago

Solved

Specific Element Count

Given a vector _v_ and a element _e_, return the number of occurrences of _e_ in _v_. Note: NaNs are equal and there may be n...

fast 5 Jahre ago

Solved

Return unique values without sorting

If the input vector A is [42 1 1], the output value B must be the unique values [42 1] The *values of B are in the s...

fast 5 Jahre ago

Solved

Matrix indexing with two vectors of indices

Given a matrix M and two index vectors a and b, return a row vector x where x(i) = M(a(i),b(i)).

fast 5 Jahre ago

Solved

Getting logical indexes

This is a basic MATLAB operation. It is for instructional purposes. --- Logical indexing works like this. thresh = 4...

fast 5 Jahre ago

Solved

Return elements unique to either input

Given two numeric inputs a and b, return a row vector that contains the numbers found in only a or only b, but not both. For ex...

fast 5 Jahre ago

Solved

Replicate elements in vectors

Replicate each element of a row vector (with NaN) a constant number of times. Examples : n=2, A=[1 2 3] -> [1 1 2 2 3 3] n=0...

fast 5 Jahre ago

Solved

Set the array elements whose value is 13 to 0

Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

fast 5 Jahre ago

Solved

Find the largest value in the 3D matrix

Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

fast 5 Jahre ago

Solved

Under the sea: Snell's law & total internal reflection

<https://en.wikipedia.org/wiki/Snell's_law> When a light travels from one medium to another medium, depending on the refracti...

fast 5 Jahre ago

Solved

Model a simple pendulum

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

fast 5 Jahre ago

Solved

Model a falling body

An object is falling freely from a height of 22 meters under the force of gravity. <<http://blogs.mathworks.com/images/seth/c...

fast 5 Jahre ago

Solved

Add damping to a mass spring system

Model an ideal mass-spring-damper system shown below where the spring is initially stretched. <<http://blogs.mathworks.com/im...

fast 5 Jahre ago

Answered

How to have matrix values as a function of another variable

|h| and |u| are vectors since |t| is also a vector, hence why you get the error when trying to put them into the matrix |P|. ...

How to have matrix values as a function of another variable

|h| and |u| are vectors since |t| is also a vector, hence why you get the error when trying to put them into the matrix |P|. ...

fast 5 Jahre ago | 0

| accepted

Answered

qickyly change 3D matrix to 2D matrix

For the example you gave, the following also works: a=squeeze(A(1,1,:));

qickyly change 3D matrix to 2D matrix

For the example you gave, the following also works: a=squeeze(A(1,1,:));

fast 5 Jahre ago | 0

Answered

Bisection Method Piecewise function

The function you have declared is called |bisection|, not |bisectionF|. When you want to call or use this function, you need to ...

Bisection Method Piecewise function

The function you have declared is called |bisection|, not |bisectionF|. When you want to call or use this function, you need to ...

fast 5 Jahre ago | 0

Solved

Model a mass spring system

Model an ideal mass-spring system shown below where the spring is initially stretched. <<http://blogs.mathworks.com/images/se...

fast 5 Jahre ago

Solved

Make a half wave rectifier

Produce a signal that outputs the given sine wave source when it is greater than zero and outputs zero when it is less than zero...

fast 5 Jahre ago

Solved

Make a full wave rectifier

Produce a full wave rectifier waveform for the given sine wave source. For a sine wave input, the output of the full wave rec...

fast 5 Jahre ago

Solved

Add offset to a signal

Produce the following signal: <<http://blogs.mathworks.com/images/seth/cody/add-offset-eqn.png>> You should see a downward...

fast 5 Jahre ago

Solved

Produce a sine wave

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

fast 5 Jahre ago

Solved

Add a block to a model

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

fast 5 Jahre ago

Answered

how to use for loop

Type |help for| in your Matlab command window, or look at the relevant <http://au.mathworks.com/help/matlab/ref/for.html documen...

how to use for loop

Type |help for| in your Matlab command window, or look at the relevant <http://au.mathworks.com/help/matlab/ref/for.html documen...

fast 5 Jahre ago | 0

Solved

Produce a cosine wave

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

fast 5 Jahre ago

Solved

Connect blocks in a model

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

fast 5 Jahre ago

Solved

Words Count: A String Array Approach

Given an input character vector consisting of words, punctuation marks, white spaces, and possibly newline characters (\n), arra...

fast 5 Jahre ago