Rounding and Overflow Modes of Fixed-Point Numbers in MATLAB

The fi function supports six rounding modes, which can be observed through the code snippets shown in the following three images. The input data x is a double-precision floating-point number, and it is to be converted into a fixed-point number with a sign bit of 1, a word length of 4, and a fractional length … Read more

Dynamic Response of a Single Degree of Freedom (SDOF) System Under Earthquake Effects Based on Matlab

The dynamic response of a Single Degree of Freedom (SDOF) system under earthquake effects based on Matlab. The displacement, velocity, and acceleration responses of the structure are calculated using two numerical integration methods (central difference method and Newmark method), and the results of these two methods are compared. Earthquake acceleration time history data is imported. … Read more

MATLAB Simulation Code | Performance Simulation of Coherent and Non-Coherent Accumulation

Related theoretical knowledge and MATLAB simulation results can be found in “Radar Principles” (Issue 10) “Analysis of Coherent and Non-Coherent Accumulation Performance”.Radar Equation MATLAB Simulation Application close all clear all clc fs=600e6;% Sampling rate t=5e-6;% Pulse width f0=2e6;% Carrier frequency Tr=50e-6;% Repetition period t1=30e-6;% Pulse position Nt1=round(fs*t1); Nt=round(fs*t); NTr=round(fs*Tr); tt=0:1/fs:t-1/fs; y0=cos(2*pi*f0.*tt); y=[zeros(1,Nt1),y0,zeros(1,(NTr-Nt1-Nt))]; for k=1:32 y1_n_ind=awgn(y,10,'measured'); … Read more

MATLAB | 1980—2022 China Meteorological Element Raster Data (Precipitation/Temperature/Wind Speed/Humidity/Pressure/Potential Evapotranspiration)

https://www.ncdc.ac.cn/portal/metadata/21691d03-bef2-4800-924e-5614e7268b87 Using monthly wind speed data as an example, this article demonstrates how to batch convert data to TIF format using MATLAB. .rtcContent { padding: 30px; } .lineNode {font-size: 10pt; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-style: normal; font-weight: normal; }inputFolder = 'E:\数据都在这里\巴音郭勒\ChinaMet_001deg_wind\ChinaMet_001deg_wind\';outputFolder = 'E:\数据都在这里\巴音郭勒\ChinaMet\ChinaMet_001deg_wind\';ncFiles = dir(fullfile(inputFolder, 'ChinaMet_001deg_wind_*.nc'));for k = 1:length(ncFiles) ncPath = fullfile(inputFolder, … Read more

Using MATLAB to Simulate Electric Vehicle Charging Curves with Monte Carlo Method and Its Impact on Daily Load Curve

Using MATLAB to simulate the charging behavior of electric vehicles (EVs) through the Monte Carlo method, including conventional charging, fast charging, and battery swapping, and analyzing their impact on the daily load curve; unordered charging, controlled charging, controlled discharging curves, and their effects on the daily load curve. Reference documents attached. The following text and … Read more

Research on Image Aggregation of Sentinel 1A Images in MATLAB (Implementation with MATLAB Code)

[Image] Gift to Readers [Image] Conducting scientific research involves a profound system of thought, requiring researchers to be logical, meticulous, and earnest. However, mere effort is not enough; often leveraging resources is more important than hard work. Additionally, one must have innovative ideas and inspirations that look up to the stars. It is recommended that … Read more

User Input in MATLAB

User Input User input can be obtained through the <span>input</span> function, which displays a prompt and waits for the user’s response: >> x = input('Starting point: ') Starting point: 0.5 x = 0.5000 Here, the user responds by entering “0.5”, which is assigned to the variable <span>x</span>. When the additional parameter <span>'s'</span> is used, the … Read more

Logistics Center Location Based on Sparrow Algorithm

Logistics Center Location Based on Sparrow Algorithm Abstract: This article mainly introduces the logistics center location algorithm based on the Sparrow algorithm. 1. Logistics Center Location Model The logistics center, as the core node of the logistics network, has a crucial impact on the efficiency, cost, and service level of the entire supply chain. A … Read more

MATLAB Typhoon Path Visualization

MATLAB Typhoon Path Visualization Author: Li Zhi Email:[email protected] 1 File Import and Parameter Settings %% Parameter Settings track_file = 'G:\lizhi_4090\D\lizhi\yu\CH2024BST-2411.txt'; output_file = 'typhoon_track_final.png'; shp_file = 'G:\lizhi_4090\D\lizhi\yu\中国标准行政区划数据GS(2024)0650号\中国标准行政区划数据GS(2024)0650号\shp格式\中国_省.shp'; map_limits = [100, 150, 10, 40]; % Longitude 100-150E, Latitude 10-40N 2 Professional Color Scheme %% Professional Color Scheme (China Meteorological Administration Standard) typhoon_colors = [ 0.7, 0.7, 0.7; … Read more

Output Formatting in MATLAB

The results of calculations in MATLAB are displayed on the screen after each assignment statement when the semicolon is omitted. The output format can be adjusted using the <span>format</span> command. However, more detailed control over the output can be achieved using multiple functions. <span>disp</span> function is used to display the value of a variable according … Read more