235 total contributions since 2019

research interests: vibrations, optimal control, system modeling and simulation, mechatronics... coding

Answered

Preventing Emphasis in plot from Simulink Model

Maybe just save/store the data instead of plotting them while simulating the model and plot afterwards if there is no need to vi...

Preventing Emphasis in plot from Simulink Model

Maybe just save/store the data instead of plotting them while simulating the model and plot afterwards if there is no need to vi...

6 hours ago | 0

Answered

How do I preallocate my variables for speed when creating an SIR model?

Memory allocation does not correct your code's errors. It helps to speed up the process of calculation and simulation. Your udp...

How do I preallocate my variables for speed when creating an SIR model?

Memory allocation does not correct your code's errors. It helps to speed up the process of calculation and simulation. Your udp...

6 hours ago | 0

Answered

Changing default output in Publish (vsn 17b)

You can change [Edit Configurations] options... to publish in pdf as a default instead of html.

Changing default output in Publish (vsn 17b)

You can change [Edit Configurations] options... to publish in pdf as a default instead of html.

7 hours ago | 0

Answered

How to get the values of for loop subsystem after every iteration in simulink

Have you tried these: https://www.mathworks.com/help/simulink/slref/selector.html https://www.mathworks.com/help/simulink/slre...

How to get the values of for loop subsystem after every iteration in simulink

Have you tried these: https://www.mathworks.com/help/simulink/slref/selector.html https://www.mathworks.com/help/simulink/slre...

7 hours ago | 0

Solved

Pi Estimate 1

Estimate Pi as described in the following link: <http://www.people.virginia.edu/~teh1m/cody/Pi_estimation1.pdf>

7 hours ago

Solved

Evil Number

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

14 hours ago

Solved

Return the 3n+1 sequence for n

A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

14 hours ago

Solved

random picture with random colours

write a function which creates a random(x,y) matrix with random RGB colours for example create_pic(5,5) gives us a 3d matrix. ...

1 day ago

Solved

Solve the set of simultaneous linear equations

Given this pair of simultaneous linear equations: 2x + 3y = 23 3x + 4y = 32 Find the solution set (x,y)

1 day ago

Solved

radius of a spherical planet

You just measured its surface area, that is the input.

1 day ago

Solved

Pizza!

Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

5 days ago

Solved

Determine if input is odd

Given the input n, return true if n is odd or false if n is even.

5 days ago

Solved

Operate on matrices of unequal, yet similar, size

You may want to add a vector to a matrix, implying that the vector is added to each column of the matrix. Or multiply a 3x4x5 ma...

5 days ago

Solved

Reverse the elements of an array

Reverse the order of elements in an array: eg: input X = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] o...

5 days ago

Solved

Rotate input square matrix 90 degrees CCW without rot90

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

5 days ago

Solved

Matrix with different incremental runs

Given a vector of positive integers a = [ 3 2 4 ]; create the matrix where the *i* th column contains the vector *1:a(i)...

5 days ago

Solved

surrounded matrix

With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones: A = [1 2 ...

5 days ago

Solved

Flip the main diagonal of a matrix

Given a n x n matrix, M, flip its main diagonal. Example: >> M=magic(5); >> flipDiagonal(M) 9 24 1 ...

6 days ago

Solved

Back to basics 23 - Triangular matrix

Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, return a matrix with all elements above a...

6 days ago

Solved

Back to basics 21 - Matrix replicating

Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...

6 days ago

Solved

Remove NaN ?

input -> matrix (n*m) with at least one element equal to NaN; output -> matrix(p*m), the same matrix where we deleted the enti...

6 days ago

Solved

Divide elements by sum of elements

In this problem, I ask you to write a function which will divide the elements of each column by the sum of the elements of the s...

6 days ago

Solved

Find all elements less than 0 or greater than 10 and replace them with NaN

Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

6 days ago

Solved

Times 2 - START HERE

Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

6 days ago

Solved

Flip the vector from right to left

Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

6 days ago

Solved

Vector creation

Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

6 days ago

Solved

Doubling elements in a vector

Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

6 days ago

Solved

Whether the input is vector?

Given the input x, return 1 if x is vector or else 0.

6 days ago