Community Profile

Contact

Top 1% contributor

Here's a function that will find all undefined variables in a given model. It returns a cell array with the variable names and a...

accepted

5

Answered 4 years ago

Yes you can create that figure in MATLAB. You can create a rotated inset axes by adjusting the axes Position and CameraUpVector ...

Answered 5 years ago

Here is one way that does not dirty the model: hws = get_param('mymodel','modelworkspace'); myData = hws.data; p = my...

2

To see the sinusoidal voltage variation you need to reduce the step size of the simulation. Go to Simulation -> Configuration Pa...

1

Answered 3 years ago

The primary mechanism to leverage a multi-core or multi-processor system with Simulink is to run multiple simulations in paralle...

Also, if you need that value as a signal in the Simulink model you can use the <http://www.mathworks.com/help/releases/R2011a/to...

If you are using R2010a or later you can use the Relational Operator block in Logic and Bit Operations to compare the vector V a...

If you are saving each value to disk as a separate file, the only thing you need to change is the filename. You can reuse the sa...

C is double so the default range for imshow is between 0 and 1, but your values are between 0 and 255. You can either specify th...

You can create a parameter dialog GUI like the built-in blocks by masking your subsystem. This blog post gives a good overview o...

3

The issue here is that the value is not exactly 0.0305, it gets truncated when displayed in the command window. You need to save...

The blocks underneat the Asynchronous machine (Mechanical model, Electrical model) are what's know as <http://www.mathworks.com/...

Another option is to discretize the transfer function because a discrete transfer function does allow a vector input signal. ...

Hi Travis, For code that you only want to execute when parameters change, you may want to put the code in the Initialization ...

Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

Solve this!

3 years ago

Create a function that produces counting up from 0 up to n then down to 0 n=2 --> 0 1 2 1 0 n=3 --> ...

Regardless of input, output the string 'yes'.

Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

Return a number equal to the number of toolboxes available to the Cody solvers.

4 years ago

Given a string that is the name of a MATLAB toolbox, return true if it is available on the Cody solvers evaluation system, false...

Given the height, h1, of a power pole, shorter than a tree, a given distance, x2 away, please find h2, height of the tree. Pleas...

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 a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

Write a function that accepts a cell array of strings and returns another cell array of strings *with only the duplicates* retai...

Check if sorted. Example: Input x = [1 2 0] Output y is 0

There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

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

Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

Load more