Community Profile

# Jarrod Rivituso

### The MathWorks

147 total contributions since 2011

Contributions in
View by

Submitted

XMLNode
MATLAB class that allows you to use XPath to navigate and extract data from an XML document.

Submitted

File I/O C S-function Example
A simple C S-function which reads data from a file during simulation.

Spectrum Analyzer!! - How to access data/plots from a FFT scope real time
Simulink does allow you to access signal data from MATLAB during simulation via the use of runtime objects. Check out this doc ...

2 years ago | 0

| accepted

I'm not able to access my free training

2 years ago | 0

Matlab Academy - Unable to login because the user has no entitled products
To be able to log in to the _MATLAB Onramp_ course on MATLAB Academy, you must have a MathWorks Account associated with a valid ...

2 years ago | 1

Solved

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

3 years ago

help using Xpath and XML reading
I may be misunderstanding things, but I think you may want to try doing something like this: dictExpr = xpath.compile('//di...

4 years ago | 0

| accepted

how to count key presses in limited time?
Oh, you need timer objects and a key press function brah! Also, you gotta stop thinking in loops and start thinking in callback...

4 years ago | 0

| accepted

How to change values in XML file?
Working with XML can definitely be tricky! Fortunately, these kinds of things are pretty well documented... <http://www.w3sc...

4 years ago | 0

| accepted

Need to create a 3 dimensional matrix of subjects, block numbers and 6 sub condition values within each block.
Is there a reason you want to store things in a 3-dimensional array? Seems you might be better off, at least at first, keeping ...

4 years ago | 0

| accepted

Solved

Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

4 years ago

Solved

More luck than brains
Give a random function that guess and return numbers from 1 to 6 exactly like the test suite .

4 years ago

Solved

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

4 years ago

Solved

Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

4 years ago

Solved

Is my wife right?
Regardless of input, output the string 'yes'.

4 years ago

Solved

Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

4 years ago

Solved

Most nonzero elements in row
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...

4 years ago

Solved

Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

4 years ago

Solved

Back and Forth Rows
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...

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

4 years ago

Solved

Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Example...

4 years ago

Object composition and property updating
I think the way that I would do this is to set the actual properties to be private properties (SetAccess=private,GetAccess=...

4 years ago | 0

How to store and print comments from a script
Hmm... helpText = help('yourMATLABFileName') Also, you may then want to split each line into a separate string line...

4 years ago | 0

Need to make a 4D plot (3D + Colour)
I'm curious how slice doesn't fit your needs. I'm no data visualization expert so please take this as an honest "I'd like to kn...

4 years ago | 1

Solved

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

4 years ago

Usint integration to calculate the cylinder/rotary actuator flow rate instead of the derivative block
I assume you are using SimHydraulics, correct? Perhaps I am misunderstanding the question, but shouldn't you be able to use a...

4 years ago | 1

Too many input arguments?
When I did stuff like this, I always just created a wrapper function that does the parameter passing. That would be replacing...

4 years ago | 0

LTI data extraction
I believe you can use the bode function for that... [mag,phase,freqs] = bode(lin) Also, if you are comparing two systems...

4 years ago | 0

| accepted