回答済み
block diagonal matrix in the opposite diagonal
Here's one option a = rand(2); b = rand(2,3); A = blkdiag(a,b) D = oppblkdiag(a,b) function D = oppblkdiag(varargin) c...

3年以上 前 | 1

| 採用済み

質問


Can a Dictionary Key be a char?
Playing with the new dictionary in 2022b and discovered that a char can't be used as the key (can use a string though) string.e...

3年以上 前 | 3 件の回答 | 0

3

回答

回答済み
underwater acoustic wave Signal to Noise Ratio (SNR)
At a minimum: SSs is still using log, probably should be log10 The equation coded for ns doesn't match the equation in the que...

3年以上 前 | 1

回答済み
Character Frequency of String
Using the new dictionary in 2022b and the on-point example from this blog post str = "SunnyDay"; chr = char(str); d = diction...

3年以上 前 | 1

回答済み
How to change constant block automatically and run automatically
Is your question, "How do I run the simulation for multiple values of firing angle and save the results of each simulation?" If...

3年以上 前 | 0

回答済み
How to get the output of a controller from MATLAB codes not simulink
I suggest using interconnection functions to build a single system model that has the control input to the plant as one of the o...

3年以上 前 | 1

回答済み
Deriving the transfer function from a data set that has magnitude,phase and omega
Hi George, I plotted the data and it looks like the data comes from a transfer function where the degree of the denominator is ...

3年以上 前 | 0

回答済み
How to subtract ?
Can do this in a loop B = 12; A = [0 1 2 3 4 5 6]; C = 0*A; C(1) = B(1) - A(1); for ii = 2:numel(A) C(ii) = C(ii-1) - ...

3年以上 前 | 1

回答済み
How can I have for loop show me each histogram it created rather then play it like a movie?
What happens if you put the command hold on after the figure(3) line?

3年以上 前 | 1

回答済み
discrete TF ""the order of the denominator must be greater than or equal to the order of the numerator""
Hi mahmoud. Q(z) can't be implemented in Simulink. If the model has another element, call it P(z), in series with Q(z), then t...

3年以上 前 | 0

質問


Where is the Documentation for Indexing on the Left Hand Side of an Assignment?
I recently ran into something like this: x = [1 2 3]; x([1 2 1]) = [10 20 30] So it looks like the second index of 1 on the L...

3年以上 前 | 1 件の回答 | 0

1

回答

回答済み
How can my code, which collects bad data with 'cellfun' and 'try, catch', be improved?
Have func() return a logical with true indicating the file is bad and false indicating the file is good. In this case we'd have...

3年以上 前 | 0

| 採用済み

回答済み
How to ROUND the elements of cell array?
% example data rng(100) child.x ={rand(1,3)}; format long child.x round(child.x{1},3)

3年以上 前 | 0

| 採用済み

回答済み
Avoid slprj folder and slxc files
Possibly can be done via Simulink preferences. Try this doc page, particularly the section on "Folders for Generated Files."

3年以上 前 | 1

| 採用済み

回答済み
Functions only plotting out to x=5
fplot doesn't take t as the first argument as would have to be done for plot. Actually, I guess it can, but it's superfluous. In...

3年以上 前 | 0

回答済み
Huge difference between the result of fft function Matlab and analytical Fourier transform of the same function
Can't say for sure w/o seeing the code, but I supsect the fftshifted curve will be close to the blue curve if you mulitply the f...

3年以上 前 | 0

| 採用済み

回答済み
How should I plot the function (sqrt(1 + x) - 1) / x using the values x = 0.1, 0.01, 0.001, ..., 10^-20?
Hi Jackson, If you want x to from -1 to -20 you have to put the stride of -1 in the colon operator, otherwise it uses the defau...

3年以上 前 | 0

回答済み
i am trying to get the value of u_E using the equation, but matlab says it has error in that line which has the equation.
Hi kaixi %creat symbol for axial force, length, thickness, displacemnent and width syms f l t d w %define governing equations...

3年以上 前 | 0

回答済み
Need help understanding where to use the . when writing equations.
HI Mark, The . (dot) is part of the symbol for the operator. In other words. .* is a two-symbol notation for the operator that ...

3年以上 前 | 0

回答済み
Linearization of Non Linear with the editor
Hi Hamza, The code will run after fixing a few things, mostily mismatched dimensions. All I did was get it to run; did not chec...

3年以上 前 | 0

回答済み
Fourier transform of symbolic function
Hi soup, The Fourier transform of x is syms t w; x=sin(2*t); fourier(x) fplot() ignores Dirac delta functions. Because ther...

3年以上 前 | 0

| 採用済み

回答済み
Plotting natural frequency, 0 input, developing transfer function
Hi Brent, The modeling equation as stated does not include a forcing input, so there is no transfer fucntion to speak of. If we...

3年以上 前 | 0

回答済み
How to change the transfer function variable in simulink during simulation time
Hi Swasthik, If I understand correctly, the R and C values are changing dynamically. Just use blocks (integrators, subtraction,...

3年以上 前 | 0

回答済み
I need to model this equation in simulink.
Assuming the Qeustion is about specific values of t and Ts, i.e., integrate a signal over an interval .... Put the integrator i...

3年以上 前 | 0

回答済み
How do we modify the tails of norrmal/any kind of distribution by keeping other portion is same?
Hard to say much, at least for me, without knowing more details about the starting PDF and how the tails are going to be modifie...

3年以上 前 | 0

| 採用済み

回答済み
Reconstructed Pulse Out of Phase
Hi Doug, I think the short answer is, don't use nextpow2. Fs = 100; %Sampling Frequency t = -0.5:1/Fs:0.5; %Time Vecto...

3年以上 前 | 0

| 採用済み

回答済み
'dare' command from Control toolbox doesn't work in the Simulink's 'Matlab Function' block
In the Matlab Function block, declare dare with coder.extrinsic. See this doc page

3年以上 前 | 0

回答済み
linear independent set formation
A set of functions fi(t) is linearly indepenedent if the only solution to a1*f1(t) + a2*f2(t) .... an*fn(t) = 0 (1) is ai = 0 ...

3年以上 前 | 0

回答済み
Triggering Simulink simulation through GUI does not send data from simulink to workspace.
Hi Amartya, Does this answer help?

3年以上 前 | 0

回答済み
sim command in Matlab and ToWorkspace in SIMULINK dont work togheter?
Hi Benjamin, Specify an ouput argument for the sim command, like so: ouputdata = sim('mymodel'); All of the ToWorkspace block...

3年以上 前 | 0

| 採用済み

さらに読み込む