Community Profile

photo

Paul


Last seen: Today Attivo dal 2011

Statistics

All
  • Guiding Light
  • 24 Month Streak
  • Thankful Level 4
  • Knowledgeable Level 5
  • Revival Level 1
  • First Answer
  • Solver

Visualizza badge

Content Feed

Visto da

Risposto
Problem with undefined function
logncdf is a function in the Statistics and Machine Learning Toolbox. That toolbox needs to be installed and it will have to be...

1 giorno fa | 0

Risposto
Solve 1D equation in simulink
Hi gdz, Assuming vpasolve needed because a closed form solution can't be found .... Can always try using an Algebraic Constrai...

2 giorni fa | 0

| accettato

Risposto
How to simply rearrange a symbolic equation to get an expression for one variable in terms of others
Not sure about solve, but isolate seems to work syms x(t) a eqn1 = x(t) == a + x(t)/2; isolate(eqn1,x(t))

2 giorni fa | 0

| accettato

Risposto
Extract operations from symbolic expression
Hi Cedric What's the objection to using a Matlab Function block? If that wasn't a constraint, you could use matlabFunctionBlock...

3 giorni fa | 0

Risposto
A question about SkyHogg model in Aerospace Blockset
Hi Islam I agree with your equation for alphadot, but not the notation. By standard convention (at least what I'm familiary wit...

3 giorni fa | 0

Risposto
How to solve optimization problems when the objective function includes a symbolic function
Hi @NJ2Cali I was able to get fmincon to run to completion using an objective function that uses syms. I changed Func2 to some...

4 giorni fa | 0

Risposto
How to interpret results of FFT/DFT?
By my calculations, if that sine wave is supposed to be 4.82 kHz, then the sampling frequency must be Fs = 1928000 Hz and the ...

4 giorni fa | 0

Risposto
Why results of the 'solve' are wrong?
Hi ruiheng, I would stay out of the double world to first make sure everything is working as expected. p_max=715.685424949238;...

5 giorni fa | 1

Risposto
Inverse Laplace plot error
Hi PTK, f1 is a symfun, so you could use fplot, or you could evaluate it at bunch of points and convert to double and the use p...

5 giorni fa | 0

Risposto
How to speed up a 2D interpolation in MATLAB?
A single call to interp2 should do the trick Position0 = 1:4; Velocity0 = 1:5; Output0 = Position0.' + Velocity0; RawPositio...

6 giorni fa | 0

| accettato

Domanda


Should sinc() be Implemented with sinpi()?
Here are the relevant lines that implement sinc dbtype sinc.m 24:27 Should line 26 now be implemented with sinpi? If concerne...

6 giorni fa | 1 risposta | 0

1

risposta

Risposto
FRD MIMO plant closed loop control, incorrect response
Define the controller fs = 5000; ts = 1/fs; g = 0.5; wp = 76.9*2*pi; d = 0.3; den = [1/wp^2 2*d/wp 1]; Ctot = tf({0 0 0 0...

6 giorni fa | 0

Risposto
periodogram for 200 Hz sample rate returns 129 array length
Hi sam, signal = linspace(0,3000,200)'; %this is 1 second of my signal (200 because that's the sample rate) [x,y] = periodogra...

6 giorni fa | 1

| accettato

Risposto
simulink add block wrong output
Hi 기범 I think the issue here is mixing together different fixed point data types. Using R2021b Here's the model, with the data...

7 giorni fa | 0

Risposto
Generating signal from weibull distribution
Hi Davide, The functions wblpdf and wblrnd are both eligible for code generation, so you can call either from inside a Matlab F...

7 giorni fa | 0

Risposto
Block callback function in Simulink model cannot access workspace variable when executed with parsim
Hi David, I think there is relatively straightforward solution to the original Question (I realize you found an alternative sol...

8 giorni fa | 0

Risposto
Area in a normalpdf
x1 = [-4:.1:4]; y1 = normpdf(x1,0,1); x = [-4:0.1:-1.5]; plot(x1,y1) hold on area(x,normpdf(x,0,1)) See area for options ...

9 giorni fa | 0

| accettato

Risposto
Trouble with MuPad when evaluating symfun at a symbolic variable instead of a number in MATLAB
Hi Nathaniel, I too could not figure out how to specify cond2 the way you want. A workaround would be to only specify cond1, a...

9 giorni fa | 0

| accettato

Risposto
Model stop function callback cannot recognise variable when running with parsim
Having all the variables in the base workspace, using sim('mymodel'), and using the StopFcn works fine because in that case Stop...

10 giorni fa | 0

Risposto
Drawing a line through the peak of the plot
m = 4.48e-26; % mass of Nitrogen molecule k = 1.38e-23; % Boltzmann Constant p = 0:2800; ind = 1; for T = 300:500:1500; ...

10 giorni fa | 0

Risposto
The real() command outputs a complex number (doesn't appear to change it).
In syms world, use isAlways to determine if an expression or variable is real, etc. syms x isAlways(in(x,'real')) assume(x,'r...

10 giorni fa | 2

Risposto
Using Matlab perform the convolution of the following signals of different duration and energy
Hi Ali, Assuming S1, S2, and S3 are continuous-domain signals, I think it would be better to compute the convolution integral u...

11 giorni fa | 0

Risposto
unexpected matlab operator error when plotting from a simulink matlab function
Hi Edoardo, Are you really trying to plot u vs. u? Wouldn't that just be a straight line? If I understand what you're trying ...

12 giorni fa | 0

Risposto
Convert string array to numetric.
If the data only contains 0's and 1's .. data = [ "01" "01" "10" "10" ...

13 giorni fa | 1

Risposto
What is the Memory Block actually useful for?
Hi Islam, Memory blocks are often used to remove algebraic loops. The doc talks about this concept, just do a search. Here's a ...

13 giorni fa | 1

| accettato

Risposto
Using Simulink from .m file
Ok. If F and Ma are constants, you should consider using a Constant block for each. Make the "Constant value" paramter F and Ma...

14 giorni fa | 1

| accettato

Risposto
Can MATLAB function blocks be set to run once per simulation instead of each time step if the outputs are used as inputs to a 1D look-up table?
That link includes three different solutions, not sure which one you're using. Having said that, not sure how the error message ...

14 giorni fa | 0

| accettato

Risposto
Zero order hold for signal reconstruction
Perhaps set the method input to interp1 to 'previous'.

14 giorni fa | 0

| accettato

Risposto
How to access the values of sym?
Not sure why feval is used. Just using solve with ReturnConditions solves for the range of b that satisfies both inequalities. ...

15 giorni fa | 0

Risposto
Simulink SImulation Inputs and Model Variables
Instead of using the StopFcn, maybe you can use setPostSimFcn functionality

15 giorni fa | 0

| accettato

Carica altro