Questions tagged [matlab]

MATLAB is a commercial numerical computer algebra system

Filter by
Sorted by
Tagged with
-2
votes
0answers
45 views

Autocorrelation question?

This is the project i'm working on https://imgur.com/a/dLe0QZW for task 4 i got the following for autocorrelation graph i got the following What does this result mean for my signal? is it something ...
-3
votes
0answers
50 views

Autocorrelation question [duplicate]

I measured the Autocorrelation of a demodulated AM signal in matlab. This was the graph I got. What does this result mean for my signal?
1
vote
2answers
55 views

Removing DC offset in MATLAB

My teacher has a demodulated signal and he removed the DC offset with this one line of code in MATLAB: y_dc = y - mean(y) Can someone please explain how this line ...
-3
votes
0answers
45 views
-2
votes
1answer
94 views

Are there any fixed point calculators? [closed]

Is there a fixed point calculator that would convert something like, signed binary, 111.00100 to -0.875? For instance, does MATLAB have anything like that? Below are the steps I am doing manually. ...
-1
votes
0answers
16 views

How can I stream data from MATLAB mobile to MATLAB desktop with mobiledev function?

I am trying to write a code which is counting steps by acceleration data. I sourced this example: https://www.mathworks.com/help/matlabmobile/ug/counting-steps-by-capturing-acceleration-data.html This ...
0
votes
0answers
32 views

How to implement Airband (Aircraft band) in this MATLAB code

I am researching Airband (Aircraft Band) for the Telecommunication course, but the professor didn't explain what to do exactly in simulation except saying that I have to do AM modulation scheme. I ...
0
votes
0answers
31 views

computation bit error as sum(abs)

I am working on a realisation the convolutional encoder/decoder with constraint length K=7. Encoder and decoder were implemented and currently I am testing these functions My test file looks like: <...
0
votes
0answers
63 views

why Am I getting linear phase

I'm trying to plot the phase of Fourier transform of the function below: \begin{gather*} x[n] = 2e^{-0.9|n|} \: \: n \in [-5,5]\\ x[n] = 0 \:\: n \notin [-5,5] \end{gather*} which is equal to the ...
1
vote
1answer
51 views

Exporting LTSpice waveform data from Monte Carlo simulation and manipulate it in MATLAB

So I am doing a Monte Carlo Simulation on LTSpice. Then I want to export my data and manipulate it in MATLAB. Here is a working example file, just with 2 decades each one with 11 points and 6 ...
2
votes
2answers
108 views

Filter noise using MATLAB to include in LTspice

I have measured a voltage, and I need to include the .txt file in my LTSpice simulation. Before doing that, I first want to filter the noise I ended up measuring (see figure below). How can I do that ...
0
votes
0answers
40 views

Implementing quadratic linear regulator (lqr) in simulink

I am working with a non-linear model of a hot-air balloon. I have linearized the system, found the operating point, the state space matrices and I know these are correct:- ...
1
vote
0answers
76 views

Numpy giving the wrong Fourier transform of sine functions

I'm using numpy's FFT to calculate the Fourier transform of \$\cos(\omega_0t)\$ and plot it. By using the definition we can derive its Fourier transform as below: \begin{equation} X_3(j\omega) = \pi (...
2
votes
1answer
63 views

Difference in Bode plot with table and Bode plot in Matlab

I am trying to generate a Bode plot for a transfer function of a high pass circuit. It's part of a solution to another question but this is the part that is confusing me. I have a transfer function: ...
1
vote
2answers
45 views

NI myDAQ behaving weird, not measuring inputs after some random time period

I am using the National Instruments myDAQ with MATLAB (using the Data Acquisition Toolbox) to generate a sine wave at defined frequencies at one of the output channels. The output channel is (...
0
votes
0answers
20 views

Im struggling trying to use HFSS (eigen mode simulation)

Okay I am supposed to set up a a rectangular vacuum filled PEC resonator in an eigenmode simulation. How am I supposed to do this? I got a rectangular prism set up with all sides as PECs and on the ...
0
votes
1answer
63 views

How do you sketch the amplitude response in MATLAB?

How do you plot the amplitude response where: $$Y=\dfrac{1}{\sqrt{R^2+\omega^2 L^2}}$$ That's it. I'm really struggling with symbolic math or converting it to a tf for bode plot and whenever I try to ...
1
vote
1answer
64 views

Why am I getting NAN and inf in output? [closed]

https://ctms.engin.umich.edu/CTMS/index.php?example=BallBeam&section=SystemModeling Above link gives information about a ball & beam system. I am trying to find the output response of a ball ...
0
votes
1answer
84 views

How can I plot the frequency response of the equation below using MATLAB?

$$\boxed{\dfrac{V_{\text{out}}(j\omega)}{V_{\text{in}}(j\omega)}=\dfrac{2\times10^9}{(1+10j\omega)(100\times10^3j\omega+20\times10^3j\omega+2\times10^9-20\times10^3j\omega}}$$ and $$\dfrac{V_{\text{...
1
vote
1answer
48 views

Output of block diagram in Z-Domain ob block diagram

I want to calculate Y(Z)[Z-Domain] for the given system with matlab. See picture of the block diagram I have tried to solve it with matlab. I have written the following matlab code. ...
0
votes
1answer
31 views

Reason for frequency steps shown in Simulink FFT analysis tool

While using the FFT in Simulink tool, I have observed that if more number of cycles are selected then frequency steps in which harmonics percentage is shown is also divided accordingly. For example: ...
1
vote
2answers
563 views

Confusion calculating steady state error in MATLAB?

I am trying to use MATLAB to calculate steady state error I have found a weblink that gives code for finding steady state error but when i use that code i get value of steady error to be greater than ...
-1
votes
1answer
76 views

How to plot graph of perpendicularly polarized uniform plane wave is incident obliquely on a dielectric to conductor boundary using Matlab

I am writing the code for the equation which is attached below ( image of equation). I have written the code but getting errors. I want to plot the graph of E and H as underlined in the image. In the ...
0
votes
0answers
33 views

C Caller Block in Simulink does not show port specification?

so I am following the steps to create a C Call block function in Simulink as in the video linked here: C Caller Block - Integrate your C code into Simulink Models Here is the source code and header ...
0
votes
0answers
41 views

FMCW radar sensor for vital sign signal processing

In order to get started with radar signal processing in MATLAB, I want to capture the heart frequency and respiration of a person with a FMCW radar. I only want to do post signal processing in MATLAB, ...
0
votes
2answers
93 views

How to convert non-standard sample range to standard

I'm working on a project to record sound from a Raspberry Pi. I have ADC values raning from 0 to 4095. I can convert it to an audio file and hear my voice. This is my algorithm for getting sample ...
0
votes
0answers
30 views

Three Phase Inverter Simulator Code

I am trying to build a controller for inverter. For this, I need build an inverter simulator, which simulates the model of the said inverter to produce a three phase output. I am trying to approach ...
0
votes
0answers
31 views

Simulink: PV System (Need help with the voltage regulator part)

I have been trying to model a PV system for a household. The scheme is as shown in the diagram. Its just a PV that connects to a boost converter then eventually an inverter. I have properly managed to ...
0
votes
0answers
80 views

Problem entering impedance values to calculate Zbus into Matlab

Im trying to compute the Zbus matrix using the next Matlab code: ...
1
vote
1answer
85 views

control of linear network

We have a linear network with n nodes, of the form: $$\dot{x} = Ax$$. I would like to apply some concepts of linear control theory to the network and see how it goes, by using Matlab. As a first step ...
0
votes
2answers
111 views

How can I run C code in specific hardware setting

i write face detection on matlab and converted to c to use on mcu (STM32F4) now i want to know the code can run on this type of mcu there is tool or something to test this?
1
vote
0answers
56 views

PID - Root Locus (Sisotool) for Transfer Function (TF) with Zero and Poles in Right Plane

I have a 8th order transfer function, you can see it in the first image: % Transfer function num = [2.091,0,203.3,0,-2151,0,-1.072e05]; den = [1,0,-830.4,0,-1.036e05,0,-5.767e05,0,2.412e07]; tf = tf(...
0
votes
1answer
204 views

Simulink - Zero Order Hold transfer function

I am trying to discretize the transfer function of my compensation. After modelling my system in continuous domain thanks to books of Christophe Basso and books of Erickson Robert W., Maksimovic ...
0
votes
1answer
70 views

Meaning of circle passing through -1 (nyquist plotting)

I'm using MATLAB to plot a few functions in nyquist plots. I'm learning nyquist plots and I'm quite new to the concept. I plotted the nyquist plot for (s3 + s2 + 2s + 2)/(s2 - 9) [unstable system] and ...
0
votes
0answers
80 views

How to Represent Discrete-Time Non-Linear System on MATLAB/Simulink

I am doing a homework, which requires me to create a tank level controller on a PLC software. In order to design an effective controller, I wanted to create the difference equation of the system first,...
1
vote
1answer
59 views

Deriving equivalent impedance of circuit with pi sections

Hello everyone, I am currently trying to find the equivalent impedance of this circuit. The circuit consist of a load C1 which are connected to a two pole pi section with line inductors which are in ...
1
vote
2answers
93 views

Matlab Pade approximation influence on bode plot and step response

I would like to approximate a delay via the pade approximation. I set a normal delay via the exponential term and I set a delay via the pade approximation and I look the difference between the both ...
0
votes
1answer
59 views

How to implement closed control loop control for a 4 switch buck boost converter?

How to can I design a controller for 4 switch buck boost converter ? I used a PID Controller as shown in the image. . I haven't yet found out the right values for the PID controller gain. I want it to ...
0
votes
0answers
39 views

How do I ignore the content in a txt file while plotting on Matlab?

lovely friends! The file in my impedance measurement data is in.txt format, with a title and numerous comments written on it. When I try to plot the data in Matlab, I get an error, which I assume is ...
0
votes
0answers
45 views

How to Design BMS in simulink?

I have designed a battery pack of li-ion batteries. At the initial stage I have given 0 at both constant blocks. This indicates there is no charging or discharging In the second fig I have applied ...
0
votes
1answer
131 views

Vienna rectifier Matlab simulation

I am trying to simulate the following case: A three-phase source in a Matlab is connected to a Vienna Rectifier which is supposed to supply power to a resistive load of 50KW. Output DC voltage to be ...
0
votes
0answers
19 views

Multi machine model of power system dynamics in MATLAB/SIMULINK

I am interested to design a controller for low frequency oscillations in power system. A standard system 4 machine 11 bus system is consider (2 area system Kundur's book). For modelling of a system in ...
0
votes
1answer
40 views

MATLAB Simscape: modeling variable load with varying DC voltage

I have a model for a solar array and a battery in MATLAB Simulink (simscape). and I would like to model a load given the power consumption over time. The load is connected to the battery the voltage ...
0
votes
1answer
26 views

error in dimension for adder in negative feedback loop

im a universiity student i was trying to model this state space with simulink i tried to use the state block but got the same error i think i need to use mux i already checked the dimensions for A B C ...
0
votes
1answer
151 views

How to find the modulation index of an amplitude modulated signal from the spectrum analyser?

My aim to is compute the modulation index(u) of a amplitude modulated waveform but I only have access to its power spectrum from the spectrum analyser. I attached an image from the spectrum analyser. ...
2
votes
0answers
158 views

Pulse Doppler radar system simulation using MATLAB

How to code this project in MATLAB I'd tried coding this project (prob. 3-2, third paragraph) in MATLAB through this tutorial : https://www.mathworks.com/help/phased/ug/doppler-shift-and-pulse-doppler-...
0
votes
1answer
113 views

Simulink scope changes value depending on simulation time

I am making a co-simulation in Simulink for a circuit that I made in ORCAD, and I saw this problem that appears: If I put the final stop time for simulation 10s the signal looks like in first picture ...
1
vote
1answer
91 views

Why is frequency spectrum centred at 1 kHz?

This is the circuit that I have built I set the Continuous-Time VCO to a frequency of 1 kHz. Since there is no message signal the modulation index is =0 meaning I would expect one peak and I would ...
0
votes
1answer
46 views

Plotting a Bode from a Transfer Function on Matlab

I need a bode plot for a transfer function from matlab which I never did before. I tried some examples but failed. How to do this on matlab? Here is the TF:
0
votes
0answers
84 views

Voltage gain from AC

Voltage gain CE & CC from AC Can you tell me please if I am true in calculation of gain of this circuit? Assumption: gm is known and beta=inf, Early VA=inf => gbe=0, gce=0. Here the Matlab code : <...

1
2 3 4 5
10