Réponse apportée
why lsim return empty states?
According to the lsim doc page, the output x is returned when the input sys is a state-space model. The doc page further distin...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
create a new array with group sum
Check out splitapply

plus de 2 ans il y a | 0

Réponse apportée
Incorrect number or types of inputs or outputs for function 'step'
Hi Archit, It would be much easier to help if you copy/paste the actual code into the Question rather than a large screen captu...

plus de 2 ans il y a | 0

Réponse apportée
ss2tf taking too long
Which version of ss2tf are you using? The one that ships with Matlab which -all ss2tf doesn't support sym inputs syms a b c d...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
logging data from Simulink to workspace
Hi Asmaa, Because the signals are already in the simulation, why would there be a need to send them from Simulink to Matlab onl...

plus de 2 ans il y a | 0

Réponse apportée
Assistance with Transfer Function Output
The second input to lsim, called 'input' in the code, has to be a vector (becuase Hd is single input) of numerical values. So yo...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
How to extract coefficients of custom variables in symbolic expression in MATLAB?
syms psi phi theta i_B j_B k_B psi_dot phi_dot theta_dot omega_B = (phi_dot - psi_dot*sin(theta))*i_B + (theta_dot*cos(phi) + p...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Discrepancy in PI Controller Outputs for voltage control and current control for droop control strategy in MATLAB
With regard to this part of the code: % //PI controller for Vd error_vd(n)=((sqrt(2))*Vd_ref(n))-(V1d(n-1)); ...

plus de 2 ans il y a | 0

Réponse apportée
We have table,Why we use timetable?
It looks like timetables offer additional functionality helpful for dealing with time histories of data: Timetables

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
creating cell array using find command
Hi Amit, Just need to prepend the index vector to keep the first column. rng(100) analysisdataacd3 = num2cell(randi(3000, 10,...

plus de 2 ans il y a | 0

Réponse apportée
Receiving an error when using interp2 to interpolate longitude and latitude (Error using griddedInterpolant Grid arrays must have NDGRID structure.).
lon = xlsread('lon.xlsx') ; lat = xlsread('lat.xlsx') ; elevation = xlsread('elevation.xlsx') ; interp2 requires matrix input...

plus de 2 ans il y a | 0

Réponse apportée
PID Controller in Simulink question
Set the 'Source' parameter to 'external' as in doc for PID block. The you can calculate the gains external to the block as funct...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
Problem in filtering my desired frequency
Hi Abdullah, A couple of issues to address in the anlaysis. I think you started by trying to define an ideal filter in the fre...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Problems in dynamic symsum variables in solving a system of equation
Hi Tsz Tsun, Why not just use regular sum instead of symsum when the goal is to just take the sum of a finite number of terms? ...

plus de 2 ans il y a | 2

| A accepté

Réponse apportée
Problem in plotting the convolution
Hi Abdullah, Although not stated explicitly in the Question, I'm going to assume that a) the objective is compute the convolut...

plus de 2 ans il y a | 0

Réponse apportée
how to interpolate stepfunctionresponse
Hi Hassen, I don't undertstand how the matrix i fits into the problem, and I assume that one column of the Matrix is a time vec...

plus de 2 ans il y a | 0

Question


Is there a way to Rewrite a Symbolic Expression in Terms of nthroot?
Suppose I have a symbolic expression syms x real g = x^(1/3) - 1 I'd like to evaluate g for negative values of x, either symb...

plus de 2 ans il y a | 1 réponse | 0

1

réponse

Réponse apportée
get x knowing f(x)
finverse works well in this case. syms f(x) y f(x) = exp(x); g(y) = subs(finverse(f),x,y) g(23)

plus de 2 ans il y a | 0

Réponse apportée
acker(): "Error using sym/poly". Why?
Hi John, A = [0 1; -4e5 -400]; B = [0; 4e5]; C = [1 0]; Aaug = [A, zeros(2,1); -C, 0]; Baug = [B; 0]; H = 1.0e+12 *...

plus de 2 ans il y a | 1

| A accepté

Question


What are Your Thoughts on TMW Documentation Linking to the File Exchange
Kind of similar to this Question, I noticed that the Tips section of integral3 cites this File Exchange submission as an option ...

plus de 2 ans il y a | 2 réponses | 0

2

réponses

Réponse apportée
Why am I getting different frequency responses for the same filter using bode() and fvtool()?
Hi Rinitha, Here is the design of the low pass filter fs = 500; % Sampling frequency Ts = 1/fs; fc = 100; % Cutoff frequency...

plus de 2 ans il y a | 2

| A accepté

Réponse apportée
Reference Frame for Forces Going into 6DOF (Euler Angles)
According to 6DOF (Euler Angles), the force inputs are the components of the net force resolved in Body Coordinates. If the "Z d...

plus de 2 ans il y a | 0

| A accepté

Question


What are the Pros and Cons of the RandStream Transformation Algorithms?
RandStream objects offer three choices for the transformation algorithm for computing standard normal random variates as shown o...

plus de 2 ans il y a | 1 réponse | 0

1

réponse

Réponse apportée
Manually compute LQI() gains using Algebraic Riccati Equation / Hamiltonian
Hi John, I just copy/pasted the code from the question (not the attached .m file) with some semicolons to suppress output and i...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Calculating a mean matrix of a cell array
Try mean(cat(3,A{:}),3,'omitnan') The omitnan flag will ignor the nan entries in the computation of the mean.

plus de 2 ans il y a | 0

Réponse apportée
Shift and duplicate values in a data set
Couple of options M = magic(4); Z = zeros(12,4); for ii = 1:3 Z(4*(ii-1)+1:4*(ii-1)+4,:) = [zeros(4,ii-1) M(:,1:end-ii+1...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Assign array in field struct
Example data Sis(1).a = 1; Sis(2).a = 2; Sis(3).a = 3; c = [30 40 50]; Assign elements of c to new field of elements of Sis...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Why Does get_param(gcb,CompiledPort*) Return Weird Results for Several Object Parameters ?
Thanks to @Andy Bartlett discussion in this thread, and further review the doc, the model has to be put into compile mode before...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
simulation issue about Scope
Hi wenchao zhang, The Constant block, by default, has a constant sample time. For the model shown, constant sample time means t...

plus de 2 ans il y a | 0

Réponse apportée
How to declare a function as extrinsic and execute it in Simulink through Matlab Function block
Try using coder.extrinsic to declare the wrapper .m function as extrinsic in the Matlab Function block and call the java functio...

plus de 2 ans il y a | 1

| A accepté

Charger plus