Answered
get plotyy second axis handle
This also would work: secondAxes = findobj('Type','axes','Color','none')

14 years ago | 1

Answered
modal decomposition using canon
According to the doc, <http://www.mathworks.com/help/releases/R2011a/toolbox/control/ref/canon.html> the canon function us...

14 years ago | 0

Answered
How do structures work?
I think MATLAB doesn't let you nest subscripts like that. However, there are workarounds. Is this what you are looking for: ...

14 years ago | 1

Answered
How to show full numbers as labels in the Y-axis of a plot
If you decide to go the "write your own function" route, have a look at this technical solution: <http://www.mathworks.com/su...

14 years ago | 3

| accepted

Answered
Control
Would the "Saturation Dynamic" block located in the Simulink -> Discontinuities library do the trick?

14 years ago | 1

Answered
Find HR from ECG.
If you are using findpeaks, you should be able to get the indices as well. >> x = 0:0.01:4*pi; >> y = sin(x); >> [yMa...

14 years ago | 1

| accepted

Answered
Passing information between level-2 matlab s-functions
Some background info that you may find useful... - Simulink goes through an "initialization" phase prior to starting its simu...

14 years ago | 0

| accepted

Answered
save workspace to .m file feature
I know that the Simulink.saveVars function can do this: >> Simulink.saveVars('testVars.m') That's been around for a litt...

14 years ago | 1

| accepted

Answered
Writing a Simulink.Signal directly from a S-Function
Are you asking whether you can write values to a data store memory element from within an S-function? If so, I personally do no...

14 years ago | 1

Answered
Generate 3D shapes
Looks like you are on the right track and you just need to get the correct equation for the height of the pyramid. One thing ...

14 years ago | 4

Answered
COM (Component Object Model) as S-Function Block in Simulink
I've never tried exactly what you are describing. However, the "Level-2 MATLAB S-function" block may allow you to do this. I w...

14 years ago | 1

| accepted

Answered
Numerical solution of integral equation with parametric variable
OK, I'm gonna assume you want to do it numerically. Check out this (warning, it gets a little crazy with the function handles):...

14 years ago | 3

| accepted

Answered
reading ASCII data in s-function from a file
Your overall approach looks good. I would suggest debugging the S-function so you can step through it. There are steps on how ...

14 years ago | 0

Answered
Is it possible to evaluate current value of variable in base workspace from GUI w/o using evalin()?
Not sure if this will help you or not, but Simulink provides run-time objects that you can use to access block data during a sim...

14 years ago | 0

Answered
Columnwise '-append'?
Could you simplify your input by creating the string first using MATLAB code and then use dlmwrite to add a single string? This...

14 years ago | 0

| accepted

Answered
Wavplay
When you switch t to being a vector, you can't store an entire vector into a single basic element y(n). You could do this in a s...

14 years ago | 0

Answered
what's Simulink model sfundebug.mdl
Have you seen the Web site on this? <http://www.mathworks.com/support/tech-notes/1600/1605.html#gen_debugging> I would imagine...

14 years ago | 1

| accepted

Answered
how to speed up calculation
Have you tried another solver besides ode45? For instance, ode15s is helpful for stiff systems, and according to the documentat...

14 years ago | 0

Answered
Plots of functions involving quadratic denomonator
The "x trick" you are using is actually the element-wise exponentiation. MATLAB is inherently a matrix language (MATrix LABorat...

14 years ago | 0

| accepted

Answered
Simulink Model Optimization
There is no way that I know of to split a single model's simulation over multiple threads, which is why I believe the simulation...

14 years ago | 3

| accepted

Answered
array for transfer function
I'm not sure if your question is a basic "how do I create arrays" question, or if you are more interested in performing the simu...

14 years ago | 0

| accepted

Answered
Problem with for loop
Forgive me if you have already thought of this, but couldn't you just keep track of the smallest answer found? Something like.....

14 years ago | 1

Answered
syntax error
There doesn't seem to be anything wrong just based on your syntax. However, some things to think about... # Are all the pa...

14 years ago | 1

| accepted

Answered
frewind
I think you misspelled "textscan". You have "txtscan" there.

14 years ago | 1

Answered
include files
When you use the mex function, you should be able to use the -I flag to specify the include directories. <http://www.mathwork...

14 years ago | 0

| accepted

Answered
gap adjustment in time series data
Here's a little example that has helped me in similar situations. >> x1 = [1 2 3 4 5] >> x2 = [5 4 3 2 1] >> xtot = [...

14 years ago | 0

Answered
drawing bar graph
Some thoughts I had... Have you tried barh? >> barh([15 45]) That will cause the bars to start from x=0, which may not be w...

14 years ago | 0

Answered
Subversion and mdl files
Hi Carlo, I'm not aware of a way to do this. However, an alternative would be to break apart your model into multiple .mdl f...

14 years ago | 1

Answered
Refreshdata for plot in GUI Axes
For 3 weeks in you seem quite competent! :) One thought I just had is to try setting the 'ydata' property explicitly... ...

14 years ago | 0

| accepted

Answered
Solve an ODE with runge kutta method
Ah, the glory of state-space. First, make the substitution u = y' Then, you have a system of two equations u' = (1...

14 years ago | 0

| accepted

Load more