Community Profile

# jessupj

Last seen: Today Active since 2019

All

#### Content Feed

View by

Question

Does exportgrahics work with simulink diagrams?
I've been using saveas(get_param(gcs,'Handle'),filename,'png') to take images (albeit low-res crummy) of simulink diagrams. ...

3 months ago | 0 answers | 0

### 0

How to solve a systems of ODE and Algebraic Equations
looks like you've got a non-autonomous DAE. with u=x(4) and y = x(5), you'd have: dx(1) = -wh.*x(1) + wh.* x(5) dx(2) = -wl....

10 months ago | 0

| accepted

How to move elements of vector
i can't think of how you might do this without a loop and maintain the matrix form. but your approach will work row-by-row for ...

12 months ago | 1

Roll a 6-Sided Die and Compute the Probability of the Sum (with bar graph)
rng('shuffle') N = 1000; % total number of rolls you want rollz=NaN(N,1); for k=1:N; rollz(k) = sum( randi([1 6],2,1) )...

1 year ago | 0

Question

simulink/simscape final state 'cannot find a matching block state to element 135' output by the same model
I have a model that contains some simulink and simcape model. The gist is: initail simulation from T0 to T1, perfrom some ana...

1 year ago | 2 answers | 0

### 2

Question

generating/extracting a simulink restart state from system output? ?problem with 'discrete' blocks?
I need to periodically interrupt a SIMULINK model, and restart it with the the state it was in at some previous time (with some ...

1 year ago | 1 answer | 4

### 1

Question

'keyboard' calls fail outside try..catch when try..catch contains a keyboard call
R2020a. this is driving me nuts this morning. function dummyout = check_kb(DUMMYARG) fprintf('check which keyboard\n') whi...

1 year ago | 1 answer | 0

### 1

Question

how to disable the CLI prompt to save simulink model before closing?
I'm calling simulink through non-GUI shell. Any error or interruption of the model (eg. Ctrl+c) seems to bring up an infinite ...

1 year ago | 1 answer | 1

### 1

How to do the following matrix multiplication and division?
(1 - Oscillator_frequency^2 / Frequency.^2)) this slash needs to be a './' or it's interpreted as a matrix inverison... htat's ...

1 year ago | 1

| accepted

how do you program the file path when you do not know where the person will save the matlab file you send them?
DIRS = dir('**/beam.tiff'); % gets a structured list of matching files % ... % additional criterion here to choose which to pi...

1 year ago | 0

Question

why isn't simulink seeing a workspace variable for initial state unless it's global?
I have a wrapper around a simulink code that i'm calling functionally. A dumbed down (not MWE, just an easier to present it tha...

1 year ago | 0 answers | 0

### 0

How to make each component a string in one whole string?
depends on how you want your output, but i'd use the split function and then cast the returned cell into a string array Snew = ...

1 year ago | 0

Question

how can i programmatically set and adjust initial conditions in simulink the right way?
I have a simulink model to which i'm trying to implement tracking/control algorithm by re-initialization: I run the model, apply...

1 year ago | 0 answers | 2

### 0

Simple question regarding "distance" function
from that link, it looks like the distance function is part of a toolbox. in my 2019b, distance is available from several toolb...

1 year ago | 0

Question

simulink sensitivity analysis stops using multiple cpus, not running parallel jobs correctly
i'm running a simulink model with the sensitiity analysis tools in R2019b via gui. running ubuntu 18.04 on a 24cpu workstation...

1 year ago | 0 answers | 0

### 0

Set a new colormap
It should be as easy as calling something like cmap = cmocean('thermal'); % or 'deep', or whichever colormap from the collecti...

2 years ago | 1

| accepted

Solved

Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

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

2 years ago

Solved

Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

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

2 years ago

Solved

Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; ...

2 years ago

Solved

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

2 years ago