活动介绍

axs[1].hist(incomes, bins=np.arange(min(incomes), max(incomes) + bin_width, bin_width)) ValueError: min() arg is an empty sequence

时间: 2024-03-07 19:50:13 浏览: 169
这个错误通常是由于传递给 min() 函数的序列为空导致的。 在这个错误中,错误信息显示 "ValueError: min() arg is an empty sequence",意思是传递给 min() 函数的序列为空。 以下是一些可能导致这个问题的原因和解决方法: 1. 序列为空。请检查你传递给 min() 函数的序列是否为空。如果是空序列,则会出现这个错误。 2. 数据类型错误。请确保你传递给 min() 函数的是一个包含可比较元素的序列。如果序列中包含不能比较的元素,则会出现这个错误。 以下是一些可能的解决方法: 1. 检查传递给 min() 函数的序列。确保它不是空序列。你可以使用 if not sequence: 来检查序列是否为空。 2. 检查序列中的数据类型。如果序列中包含不能比较的元素,则需要先将其转换为可比较的类型。你可以使用 filter() 函数或列表推导式来过滤掉不能比较的元素。 例如,以下代码可以过滤掉序列中的字符串元素: ``` numbers = [1, 2, '3', 4, '5'] numbers = [x for x in numbers if isinstance(x, int)] print(min(numbers)) ``` 3. 检查变量 incomes 是否被正确地初始化。如果变量 incomes 为空,则会出现这个错误。你可以在传递变量 incomes 给 hist() 函数前对其进行检查。 例如,以下代码会在变量 incomes 为空时给出一条警告: ``` if not incomes: print("Warning: the incomes list is empty.") axs[1].hist(incomes, bins=np.arange(min(incomes), max(incomes) + bin_width, bin_width)) ``` 如果以上方法都无法解决问题,请检查你的代码并确认是否存在其他错误。
阅读全文

相关推荐

import numpy as np import matplotlib.pyplot as plt from matplotlib import cm from matplotlib.animation import FuncAnimation from mpl_toolkits.mplot3d import Axes3D import ipywidgets as widgets from IPython.display import display plt.rcParams['axes.unicode_minus'] = False # 解决负号显示问题 plt.rcParams["font.family"] = "SimHei" # 设置中文字体 # 物理常数 c = 3e8 # 光速 (m/s) class FDAArraySimulator: def __init__(self, f0=10e9, delta_f=50e3, N=16): """ 初始化FDA阵列仿真器 参数: f0: 中心频率 (Hz) delta_f: 频率增量 (Hz) - 关键FDA参数 N: 阵元数量 """ self.f0 = f0 self.delta_f = delta_f self.N = N self.d = 0.5 * c / f0 # 阵元间距 (半波长) # 仿真参数 self.theta = np.linspace(-90, 90, 181) # 方位角 (度) self.R = np.linspace(100, 10000, 101) # 距离 (米) self.time_points = np.linspace(0, 1e-3, 100) # 时间序列 (秒) self.theta_rad = np.deg2rad(self.theta) # 转换为弧度 def calculate_fda_beam(self, t): """ 计算FDA阵列因子,体现空间-时间耦合特性 参数: t: 时间点 (秒) 返回: 归一化的阵列因子 (距离 × 角度) """ # 初始化阵列因子矩阵 AF = np.zeros((len(self.R), len(self.theta)), dtype=complex) for m in range(self.N): # 遍历每个阵元 # 计算当前阵元的频率 f_m = self.f0 + m * self.delta_f # 空间相位分量 (角度相关) space_phase = 2 * np.pi * f_m * (m * self.d * np.sin(self.theta_rad)) / c #体现角度依赖性(波束方向) # 时间相位分量 (时间相关) time_phase = 2 * np.pi * self.delta_f * m * t #实现时间相关性(自动扫描特性) # 距离相位分量 (距离相关) range_phase = 2 * np.pi * f_m * self.R[:, None] / c #引入距离依赖性(FDA独特特性) # 综合阵列因子 - 体现空间-时间耦合 AF += np.exp(1j * (space_phase - range_phase + time_phase)) return np.abs(AF) / self.N # 归一化 def plot_spatio_temporal_coupling(self, t=0.5e-3): """ 可视化空间-时间耦合特性 参数: t: 时间点 (秒) """ fig = plt.figure(figsize=(15, 10)) # 计算波束方向图 beam_pattern = self.calculate_fda_beam(t) # 1. 距离-角度热力图 plt.subplot(2, 2, 1) plt.imshow(20 * np.log10(beam_pattern + 1e-10), extent=[self.theta.min(), self.theta.max(), self.R.min() / 1000, self.R.max() / 1000], aspect='auto', cmap='jet', origin='lower') plt.colorbar(label='增益 (dB)') plt.xlabel('方位角 (度)') plt.ylabel('距离 (km)') plt.title(f'FDA空间-时间耦合特性 (t={t * 1000:.1f}ms)') # 2. 固定距离的切面 plt.subplot(2, 2, 2) fixed_range_idx = 50 # 选择中间距离 plt.plot(self.theta, 20 * np.log10(beam_pattern[fixed_range_idx, :] + 1e-10)) plt.xlabel('方位角 (度)') plt.ylabel('增益 (dB)') plt.title(f'固定距离{self.R[fixed_range_idx] / 1000:.1f}km的波束方向图') plt.grid(True) # 3. 固定角度的切面 plt.subplot(2, 2, 3) fixed_angle_idx = 90 # 选择0度方向 plt.plot(self.R / 1000, 20 * np.log10(beam_pattern[:, fixed_angle_idx] + 1e-10)) plt.xlabel('距离 (km)') plt.ylabel('增益 (dB)') plt.title(f'固定方位角{self.theta[fixed_angle_idx]:.0f}°的波束方向图') plt.grid(True) # 4. 空间-时间耦合示意图 plt.subplot(2, 2, 4) # 在固定距离和角度上观察增益随时间变化 fixed_range = 5000 # 固定距离5km fixed_angle = 0 # 固定角度0度 r_idx = np.argmin(np.abs(self.R - fixed_range)) a_idx = np.argmin(np.abs(self.theta - fixed_angle)) # 计算时间序列上的增益变化 time_gain = [] for time_point in self.time_points: beam = self.calculate_fda_beam(time_point) time_gain.append(20 * np.log10(beam[r_idx, a_idx] + 1e-10)) plt.plot(self.time_points * 1000, time_gain) plt.xlabel('时间 (ms)') plt.ylabel('增益 (dB)') plt.title(f'固定点(θ={fixed_angle}°, R={fixed_range / 1000:.1f}km)的增益随时间变化') plt.grid(True) plt.tight_layout() plt.show() def animate_auto_scanning(self): """ 创建自动扫描特性的动画 """ fig = plt.figure(figsize=(10, 8)) ax = fig.add_subplot(111, projection='3d') # 创建网格 T, R_grid = np.meshgrid(self.theta, self.R / 1000) # 初始化空图 beam = self.calculate_fda_beam(0) Z = 20 * np.log10(beam + 1e-10) surf = ax.plot_surface(T, R_grid, Z, cmap=cm.jet, alpha=0.8) # 设置坐标轴标签 ax.set_xlabel('方位角 (度)') ax.set_ylabel('距离 (km)') ax.set_zlabel('增益 (dB)') ax.set_title('FDA自动扫描特性 (t=0 ms)') ax.set_zlim(-40, 0) # 更新函数用于动画 def update(frame): ax.clear() t = self.time_points[frame] beam = self.calculate_fda_beam(t) Z = 20 * np.log10(beam + 1e-10) surf = ax.plot_surface(T, R_grid, Z, cmap=cm.jet, alpha=0.8) ax.set_xlabel('方位角 (度)') ax.set_ylabel('距离 (km)') ax.set_zlabel('增益 (dB)') ax.set_title(f'FDA自动扫描特性 (t={t * 1000:.1f} ms)') ax.set_zlim(-40, 0) return surf, # 创建动画 ani = FuncAnimation(fig, update, frames=len(self.time_points), interval=50, blit=False) plt.tight_layout() plt.show() return ani def interactive_parameter_analysis(self): """ 交互式参数分析界面 """ style = {'description_width': 'initial'} # 创建交互控件 delta_f_slider = widgets.FloatLogSlider( value=self.delta_f, min=3, max=6, step=0.1, description='频率增量Δf (Hz):', readout_format='.0f', style=style ) time_slider = widgets.FloatSlider( value=0, min=0, max=1e-3, step=1e-5, description='时间 t (s):', readout_format='.5f', style=style ) angle_slider = widgets.FloatSlider( value=0, min=-90, max=90, step=1, description='固定角度θ (度):', style=style ) range_slider = widgets.FloatSlider( value=5000, min=100, max=10000, step=100, description='固定距离R (m):', style=style ) # 更新函数 def update_plots(delta_f_val, t_val, fixed_angle, fixed_range): # 临时创建新的仿真器实例 temp_simulator = FDAArraySimulator( f0=self.f0, delta_f=delta_f_val, N=self.N ) # 计算波束方向图 beam_pattern = temp_simulator.calculate_fda_beam(t_val) # 创建图形 fig, axs = plt.subplots(1, 2, figsize=(15, 6)) # 1. 距离-角度热力图 im = axs[0].imshow(20 * np.log10(beam_pattern + 1e-10), extent=[self.theta.min(), self.theta.max(), self.R.min() / 1000, self.R.max() / 1000], aspect='auto', cmap='jet', origin='lower') fig.colorbar(im, ax=axs[0], label='增益 (dB)') axs[0].set_xlabel('方位角 (度)') axs[0].set_ylabel('距离 (km)') axs[0].set_title(f'FDA波束方向图 (Δf={delta_f_val / 1000:.1f}kHz, t={t_val * 1000:.2f}ms)') # 2. 固定角度和距离的增益变化 r_idx = np.argmin(np.abs(self.R - fixed_range)) a_idx = np.argmin(np.abs(self.theta - fixed_angle)) # 计算时间序列上的增益变化 time_gain = [] for time_point in self.time_points: temp_beam = temp_simulator.calculate_fda_beam(time_point) time_gain.append(20 * np.log10(temp_beam[r_idx, a_idx] + 1e-10)) axs[1].plot(self.time_points * 1000, time_gain) axs[1].axvline(x=t_val * 1000, color='r', linestyle='--', label=f'当前时间: {t_val * 1000:.2f}ms') axs[1].set_xlabel('时间 (ms)') axs[1].set_ylabel('增益 (dB)') axs[1].set_title(f'固定点(θ={fixed_angle}°, R={fixed_range / 1000:.1f}km)的增益随时间变化') axs[1].grid(True) axs[1].legend() plt.tight_layout() plt.show() # 创建交互界面 widgets.interactive( update_plots, delta_f_val=delta_f_slider, t_val=time_slider, fixed_angle=angle_slider, fixed_range=range_slider ) # ========== 主执行函数 ========== if __name__ == "__main__": print("频控阵天线(FDA)波束特性仿真") # 创建FDA仿真器实例 fda_simulator = FDAArraySimulator() print("1. 空间-时间耦合特性") fda_simulator.plot_spatio_temporal_coupling() print("\n2. 自动扫描特性 (动画展示)") fda_simulator.animate_auto_scanning() print("\n3. 交互式参数分析") fda_simulator.interactive_parameter_analysis()

import numpy as np import matplotlib.pyplot as plt from matplotlib import cm from matplotlib.animation import FuncAnimation from mpl_toolkits.mplot3d import Axes3D import ipywidgets as widgets from IPython.display import display plt.rcParams['axes.unicode_minus'] = False # 解决负号显示问题 plt.rcParams["font.family"] = "SimHei" # 设置中文字体 # 物理常数 c = 3e8 # 光速 (m/s) class RawFDAArraySimulator: def __init__(self, f0=24e8, delta_f=100e3, N=16): """ 去归一化FDA阵列仿真器 f0: 中心频率 (Hz) delta_f: 频率增量 (Hz) - 关键FDA参数 N: 阵元数量 """ self.f0 = f0 self.delta_f = delta_f self.N = N self.d = 0.5 * c / f0 # 阵元间距 (半波长) # 仿真参数 - 无归一化处理 self.theta = np.linspace(-90, 90, 181) # 方位角 (度) self.R = np.linspace(100, 10000, 101) # 距离 (米) self.time_points = np.linspace(0, 1e-3, 100) # 时间序列 (秒) self.theta_rad = np.deg2rad(self.theta) # 转换为弧度 def calculate_fda_beam(self, t): """ 计算FDA阵列因子,体现空间-时间耦合特性 - 无归一化 参数: t: 时间点 (秒) 返回: 原始阵列因子幅度 (距离 × 角度) """ # 初始化阵列因子矩阵 AF = np.zeros((len(self.R), len(self.theta)), dtype=complex) for m in range(self.N): # 遍历每个阵元 # 计算当前阵元的频率 f_m = self.f0 + m * self.delta_f # 空间相位分量 (角度相关) space_phase = 2 * np.pi * f_m * (m * self.d * np.sin(self.theta_rad)) / c # 时间相位分量 (时间相关) time_phase = 2 * np.pi * self.delta_f * m * t # 距离相位分量 (距离相关) range_phase = 2 * np.pi * f_m * self.R[:, None] / c # 综合阵列因子 - 体现空间-时间耦合 AF += np.exp(1j * (space_phase - range_phase + time_phase)) return np.abs(AF) # 直接返回幅度值,无归一化 def plot_spatio_temporal_coupling(self, t=0.5e-3): """ 可视化空间-时间耦合特性 - 无归一化 """ fig = plt.figure(figsize=(15, 10)) # 计算波束方向图 beam_pattern = self.calculate_fda_beam(t) # 1. 距离-角度热力图 - 使用原始幅度值 plt.subplot(2, 2, 1) plt.imshow(beam_pattern, # 直接使用幅度值 extent=[self.theta.min(), self.theta.max(), self.R.min() / 1000, self.R.max() / 1000], aspect='auto', cmap='jet', origin='lower') plt.colorbar(label='阵列因子幅度') plt.xlabel('方位角 (度)') plt.ylabel('距离 (km)') plt.title(f'FDA空间-时间耦合特性 (t={t * 1000:.1f}ms)') # 2. 固定距离的切面 - 使用原始幅度值 plt.subplot(2, 2, 2) fixed_range_idx = 50 # 选择中间距离 plt.plot(self.theta, beam_pattern[fixed_range_idx, :]) plt.xlabel('方位角 (度)') plt.ylabel('阵列因子幅度') plt.title(f'固定距离{self.R[fixed_range_idx] / 1000:.1f}km的波束方向图') plt.grid(True) # 3. 固定角度的切面 - 使用原始幅度值 plt.subplot(2, 2, 3) fixed_angle_idx = 90 # 选择0度方向 plt.plot(self.R / 1000, beam_pattern[:, fixed_angle_idx]) plt.xlabel('距离 (km)') plt.ylabel('阵列因子幅度') plt.title(f'固定方位角{self.theta[fixed_angle_idx]:.0f}°的波束方向图') plt.grid(True) # 4. 空间-时间耦合示意图 - 使用原始幅度值 plt.subplot(2, 2, 4) # 在固定距离和角度上观察幅度随时间变化 fixed_range = 5000 # 固定距离5km fixed_angle = 0 # 固定角度0度 r_idx = np.argmin(np.abs(self.R - fixed_range)) a_idx = np.argmin(np.abs(self.theta - fixed_angle)) # 计算时间序列上的幅度变化 time_amplitude = [] for time_point in self.time_points: beam = self.calculate_fda_beam(time_point) time_amplitude.append(beam[r_idx, a_idx]) plt.plot(self.time_points * 1000, time_amplitude) plt.xlabel('时间 (ms)') plt.ylabel('阵列因子幅度') plt.title(f'固定点(θ={fixed_angle}°, R={fixed_range / 1000:.1f}km)的幅度随时间变化') plt.grid(True) plt.tight_layout() plt.show() def animate_auto_scanning(self): """ 创建自动扫描特性的动画 - 无归一化 """ fig = plt.figure(figsize=(10, 8)) ax = fig.add_subplot(111, projection='3d') # 创建网格 T, R_grid = np.meshgrid(self.theta, self.R / 1000) # 初始化空图 beam = self.calculate_fda_beam(0) surf = ax.plot_surface(T, R_grid, beam, cmap=cm.jet, alpha=0.8) # 设置坐标轴标签 ax.set_xlabel('方位角 (度)') ax.set_ylabel('距离 (km)') ax.set_zlabel('阵列因子幅度') ax.set_title('FDA自动扫描特性 (t=0 ms)') ax.set_zlim(0, self.N) # 幅度范围0到N # 更新函数用于动画 def update(frame): ax.clear() t = self.time_points[frame] beam = self.calculate_fda_beam(t) surf = ax.plot_surface(T, R_grid, beam, cmap=cm.jet, alpha=0.8) ax.set_xlabel('方位角 (度)') ax.set_ylabel('距离 (km)') ax.set_zlabel('阵列因子幅度') ax.set_title(f'FDA自动扫描特性 (t={t * 1000:.1f} ms)') ax.set_zlim(0, self.N) # 保持幅度范围一致 return surf, # 创建动画 ani = FuncAnimation(fig, update, frames=len(self.time_points), interval=50, blit=False) plt.tight_layout() plt.show() return ani def interactive_parameter_analysis(self): """ 交互式参数分析界面 - 无归一化 """ style = {'description_width': 'initial'} # 创建交互控件 delta_f_slider = widgets.FloatLogSlider( value=self.delta_f, min=3, max=6, step=0.1, description='频率增量Δf (Hz):', readout_format='.0f', style=style ) time_slider = widgets.FloatSlider( value=0, min=0, max=1e-3, step=1e-5, description='时间 t (s):', readout_format='.5f', style=style ) angle_slider = widgets.FloatSlider( value=0, min=-90, max=90, step=1, description='固定角度θ (度):', style=style ) range_slider = widgets.FloatSlider( value=5000, min=100, max=10000, step=100, description='固定距离R (m):', style=style ) # 更新函数 def update_plots(delta_f_val, t_val, fixed_angle, fixed_range): # 临时创建新的仿真器实例 temp_simulator = RawFDAArraySimulator( f0=self.f0, delta_f=delta_f_val, N=self.N ) # 计算波束方向图 beam_pattern = temp_simulator.calculate_fda_beam(t_val) # 创建图形 fig, axs = plt.subplots(1, 2, figsize=(15, 6)) # 1. 距离-角度热力图 - 使用原始幅度值 im = axs[0].imshow(beam_pattern, extent=[self.theta.min(), self.theta.max(), self.R.min() / 1000, self.R.max() / 1000], aspect='auto', cmap='jet', origin='lower') fig.colorbar(im, ax=axs[0], label='阵列因子幅度') axs[0].set_xlabel('方位角 (度)') axs[0].set_ylabel('距离 (km)') axs[0].set_title(f'FDA波束方向图 (Δf={delta_f_val / 1000:.1f}kHz, t={t_val * 1000:.2f}ms)') # 2. 固定角度和距离的幅度变化 r_idx = np.argmin(np.abs(self.R - fixed_range)) a_idx = np.argmin(np.abs(self.theta - fixed_angle)) # 计算时间序列上的幅度变化 time_amplitude = [] for time_point in self.time_points: temp_beam = temp_simulator.calculate_fda_beam(time_point) time_amplitude.append(temp_beam[r_idx, a_idx]) axs[1].plot(self.time_points * 1000, time_amplitude) axs[1].axvline(x=t_val * 1000, color='r', linestyle='--', label=f'当前时间: {t_val * 1000:.2f}ms') axs[1].set_xlabel('时间 (ms)') axs[1].set_ylabel('阵列因子幅度') axs[1].set_title(f'固定点(θ={fixed_angle}°, R={fixed_range / 1000:.1f}km)的幅度随时间变化') axs[1].grid(True) axs[1].legend() plt.tight_layout() plt.show() # 创建交互界面 widgets.interactive( update_plots, delta_f_val=delta_f_slider, t_val=time_slider, fixed_angle=angle_slider, fixed_range=range_slider ) # ========== 主执行函数 ========== if __name__ == "__main__": print("频控阵天线(FDA)波束特性仿真 (去归一化)") # 创建FDA仿真器实例 fda_simulator = RawFDAArraySimulator() print("1. 空间-时间耦合特性 (无归一化)") fda_simulator.plot_spatio_temporal_coupling() print("\n2. 自动扫描特性 (无归一化动画展示)") fda_simulator.animate_auto_scanning() print("\n3. 交互式参数分析 (无归一化)") fda_simulator.interactive_parameter_analysis()

import cv2 import numpy as np from matplotlib import pyplot as plt def load_images(image_paths): """加载两张测试图片""" images = [] for path in image_paths: img = cv2.imread(path, 0) # 以灰度模式读取图片 images.append(img) return images def plot_histogram_and_image(image, title="Image", bins=256): """绘制图片及对应的直方图""" fig, axs = plt.subplots(1, 2, figsize=(10, 5)) axs[0].imshow(image, cmap='gray') axs[0].set_title(f"{title} Image") axs[0].axis('off') hist, bins = np.histogram(image.ravel(), bins=bins) center = (bins[:-1] + bins[1:]) / 2 axs[1].bar(center, hist, align='center', width=1) axs[1].set_xlim([0, 256]) axs[1].set_title(f'{title} Histogram') plt.tight_layout() return fig def histogram_equalization(image): """执行直方图均衡化操作""" equalized_img = cv2.equalizeHist(image) return equalized_img if __name__ == '__main__': # 加载两张不同光照条件下的图像路径 image_paths = ['high_light_image_path.jpg', 'low_light_image_path.jpg'] # 调用函数加载图像 original_images = load_images(image_paths) figures = [] for i, img in enumerate(original_images): # 分别对每张图做直方图均衡化处理 eq_img = histogram_equalization(img) # 创建2*2布局展示原始图、直方图和均衡化后结果 fig = plt.figure(figsize=(12, 8)) ax1 = plt.subplot(2, 2, 1) plt.imshow(img, cmap='gray') plt.title("Original Image") plt.axis('off') ax2 = plt.subplot(2, 2, 2) plt.hist(img.ravel(), 256, [0, 256]) plt.xlim([0, 256]) plt.title("Original Histogram") ax3 = plt.subplot(2, 2, 3) plt.imshow(eq_img, cmap='gray') plt.title("Equalized Image") plt.axis('off') ax4 = plt.subplot(2, 2, 4) plt.hist(eq_img.ravel(), 256, [0, 256]) plt.xlim([0, 256]) plt.title("Equalized Histogram") plt.tight_layout() figures.append(fig) plt.show()我应该把哪里的的代码改为图片名称

#plot 2 harmonic lines import os import glob import numpy as np import pandas as pd import matplotlib.pyplot as plt from obspy import read g = [14] # 定义bin的角度间隔和范围 bin_angle_interval = 5 bin_angle_range = np.arange(0, 360, bin_angle_interval) csv_rfani = "/media/zekun/Software/fenglin_niu/rfani.csv" ani = pd.read_csv(csv_rfani) csv_rfcan = "/media/zekun/Software/pictures/anis_yn_final/rfcan.csv" rfcan = pd.read_csv(csv_rfcan) # 创建绘图对象 #%matplotlib inline #%config InlineBackend.figure_format = 'svg' # 创建一个包含两个子图的图形窗口 (1行2列布局) fig, axs = plt.subplots(1, 2) # 创建绘图对象 %matplotlib inline %config InlineBackend.figure_format = 'svg' fig, axs[0] = plt.subplots(figsize=(9, 12)) fig, axs[1] = plt.subplots(figsize=(9, 12)) for i in g: if len(str(i))==1: n='00'+str(i) else: n='0'+str(i) # 创建存储叠加波形和事件数目的字典 stacked_waveforms = {angle: np.zeros(10004) for angle in bin_angle_range} event_counts = {angle: 0 for angle in bin_angle_range} # SAC文件所在的文件夹路径 sac_folder = '/media/zekun/Software/fenglin_niu/RFcan/examples/YN.'+str(n)+'/RFcan' png_folder='/media/zekun/Software/fenglin_niu/yn-pic/YN.'+str(n)+'.png' # 遍历文件夹中的所有SAC文件 sac_files = glob.glob(os.path.join(sac_folder, '*BHR')) for sac_file in sac_files: # 读取SAC文件 st = read(sac_file) tr = st[0] # 获取反方位角信息 back_azimuth = tr.stats.sac['baz'] # 找到对应的bin bin_angle = int((back_azimuth-2.5) // bin_angle_interval) * bin_angle_interval+bin_angle_interval # 对波形进行叠加 stacked_waveforms[bin_angle] += tr.data event_counts[bin_angle] += 1 # 对叠加后的波形进行归一化处理 for angle in bin_angle_range: stacked_waveforms[angle] /= event_counts[angle] stacked_waveforms[angle]*=30 # 绘制每个bin的波形 for angle in bin_angle_range: # 获取波形数据 waveform = stacked_waveforms[angle] #print(waveform) # 设置绘图的纵轴刻度位置 y = ((angle) // bin_angle_interval) * 5 # 绘制波形 axs[0].plot(tr.times()-10, waveform + y, color='black',linewidth=0.1) # 填充颜色 axs[0].fill_between(tr.times()-10, waveform + y, y, where=(waveform >= 0), color='lightcoral') axs[0].fill_between(tr.times()-10, waveform + y, y, where=(waveform < 0), color='lightblue') #next for index, row in ani.iterrows(): # 检查sta列的值是否为7 if row['sta'] == i: # 获取对应的k列的值 t = row['t'] for index, row in rfcan.iterrows(): # 检查sta列的值是否为7 if row['sta'] == i: # 获取对应的k列的值 phi_ra = row['phi(ra)'] phi_jof = row['phi(jof)'] dt_ra = row['dt(ra)'] dt_jof = row['dt(jof)'] # 绘制竖线 axs[0].axvline(x=t, linestyle='dashed', color='gray') #cos y = np.linspace(0, 361, 1000) #x = t - dt_ra * np.cos(2*np.deg2rad(phi_ra - y))/2 axs[0].plot(x, y, linewidth=2, label='ra', zorder=1) x = t - dt_jof * np.cos(2*np.deg2rad(phi_jof - y))/2 axs[0].plot(x, y, color='gold', linewidth=2, label='jof', alpha=0.9, zorder=1) # 绘制每个bin的波形 k=0 for angle in bin_angle_range: # 获取波形数据 waveform = stacked_waveforms[angle] #print(waveform) # 设置绘图的纵轴刻度位置 y = ((angle) // bin_angle_interval) * 5 # 绘制波形 #ax.plot(tr.times()-10, waveform + y, color='black',linewidth=0.1) # 填充颜色 #ax.fill_between(tr.times()-10, waveform + y, y, where=(waveform >= 0), color='lightcoral') #ax.fill_between(tr.times()-10, waveform + y, y, where=(waveform < 0), color='lightblue') if str(waveform[0])!='nan': k+=1 #print(waveform) #peak value max_values = [] trace_data = waveform trace_times = tr.times() for j in range(0,57): if float(ani['sta'][j])==float(str(i)): start_time=float(ani['t'][j])-float(ani['n5'][j])+10 end_time=float(ani['t'][j])+float(ani['n5'][j])+10 indices = [i for i, t in enumerate(trace_times) if start_time <= t <= end_time] #print(trace_data[indices]) if indices: max_value = max(trace_data[indices]) max_indices = [i for i, value in enumerate(trace_data) if value == max_value] max_times = [(trace_times[i]-10) for i in max_indices] max_values.extend(max_times) if max_values[-1]==max_values[0]+(len(max_values)-1)*0.005: max_time=(max_values[0]+max_values[-1])/2 else: max_time=max_values[0] if k==1: axs[0].scatter(max_values[0], y, s=30, color='green', alpha=0.9, label='peak', zorder=2) else: axs[0].scatter(max_values[0], y, s=30, color='green', alpha=0.9, zorder=2) # 设置图像范围和标签 axs[0].set_xlim(-2, 20) axs[0].set_ylim(-5, len(bin_angle_range) * 5 + 5) axs[0].set_xlabel('Time (s)', fontsize=7) axs[0].set_ylabel('Back Azimuth (°)', fontsize=7) axs[0].set_title('R RFs, before correction', fontsize=8) # SAC文件所在的文件夹路径 sac_folder = '/media/zekun/Software/fenglin_niu/RFcan/examples/YN.'+str(n)+'/RFcan' #png_folder='/media/zekun/Software/fenglin_niu/yn-pic/BHR.F/YN.'+str(n)+'.png' # 创建存储叠加波形和事件数目的字典 stacked_waveforms = {angle: np.zeros(6002) for angle in bin_angle_range} event_counts = {angle: 0 for angle in bin_angle_range} # 遍历文件夹中的所有SAC文件 sac_files = glob.glob(os.path.join(sac_folder, '*BHR.F')) for sac_file in sac_files: # 读取SAC文件 st = read(sac_file) tr = st[0] # 获取反方位角信息 back_azimuth = tr.stats.sac['baz'] # 找到对应的bin bin_angle = int(back_azimuth // bin_angle_interval) * bin_angle_interval # 对波形进行叠加 stacked_waveforms[bin_angle] += tr.data event_counts[bin_angle] += 1 # 对叠加后的波形进行归一化处理 for angle in bin_angle_range: stacked_waveforms[angle] /= event_counts[angle] stacked_waveforms[angle]*=30 # 创建绘图对象 #%matplotlib inline #%config InlineBackend.figure_format = 'svg' # 绘制每个bin的波形 for angle in bin_angle_range: # 获取波形数据 waveform = stacked_waveforms[angle] # 设置绘图的纵轴刻度位置 y = (angle // bin_angle_interval + 1) * 5 # 绘制波形 axs[1].plot(tr.times()-10, waveform + y, color='black',linewidth=0.1) # 填充颜色 axs[1].fill_between(tr.times()-10, waveform + y, y, where=(waveform >= 0), color='lightcoral') axs[1].fill_between(tr.times()-10, waveform + y, y, where=(waveform < 0), color='lightblue') for index, row in ani.iterrows(): # 检查sta列的值是否为7 if row['sta'] == i: # 获取对应的k列的值 t = row['t'] # 绘制竖线 axs[1].axvline(x=float(t), linestyle='dashed', color='gray') # 设置图像范围和标签 axs[1].set_xlim(-2, 20) axs[1].set_ylim(-5, len(bin_angle_range) * 5 + 5) axs[1].set_xlabel('Time (s)', fontsize=7) #axs[1].set_ylabel('Amplitude') axs[1].set_title('R RFs, after correction', fontsize=8) for ax in axs.flat: # 遍历所有的子图 (如果是二维数组的话需要flatten化) # 设置横轴的大刻度和小刻度 ax.yaxis.set_major_locator(plt.MultipleLocator(50)) ax.yaxis.set_minor_locator(plt.MultipleLocator(10)) #ax.yaxis.set_major_formatter(plt.FuncFormatter(lambda x, pos: f'{x:.1f}' if pos % 2 != 0 else '')) plt.tick_params(axis='y', top=True, labeltop=True) ax.tick_params(axis='y', which='minor', top=True) ax.tick_params(axis='both', which='major', labelsize=6) #plt.subplots_adjust(wspace=0.1) # 显示图像 plt.savefig(png_folder,dpi=1000) plt.show() 我想用这段代码绘制一行二列的两个子图,为什么在jupyter notebook中得到的是二行一列的图,甚至生成的png图像中只有第二个子图

上面的输入数据没有变我给你个样本,请你像这样写一段代码解决Learn from the documentation for imbalanced classification and use any of the sampling methods to deal with the credictcard-reduced.csv dataset. Evaluate model performance before and after sampling. 这个问题from sklearn.datasets import make_classification X, y = make_classification( n_samples=100, n_features=2, n_informative=2, n_redundant=0, n_repeated=0, n_classes=3, n_clusters_per_class=1, weights=[0.1, 0.2, 0.7], class_sep=0.8, random_state=0, ) _, ax = plt.subplots(figsize=(6, 6)) _ = ax.scatter(X[:, 0], X[:, 1], c=y, alpha=0.8, edgecolor="k") plot comparison combine The following function will be used to plot the sample space after resampling to illustrate the characteristic of an algorithm. from collections import Counter def plot_resampling(X, y, sampler, ax): """Plot the resampled dataset using the sampler.""" X_res, y_res = sampler.fit_resample(X, y) ax.scatter(X_res[:, 0], X_res[:, 1], c=y_res, alpha=0.8, edgecolor="k") sns.despine(ax=ax, offset=10) ax.set_title(f"Decision function for {sampler.__class__.__name__}") return Counter(y_res)The following function will be used to plot the decision function of a classifier given some data. import numpy as np def plot_decision_function(X, y, clf, ax): """Plot the decision function of the classifier and the original data""" plot_step = 0.02 x_min, x_max = X[:, 0].min() - 1, X[:, 0].max() + 1 y_min, y_max = X[:, 1].min() - 1, X[:, 1].max() + 1 xx, yy = np.meshgrid( np.arange(x_min, x_max, plot_step), np.arange(y_min, y_max, plot_step) ) Z = clf.predict(np.c_[xx.ravel(), yy.ravel()]) Z = Z.reshape(xx.shape) ax.contourf(xx, yy, Z, alpha=0.4) ax.scatter(X[:, 0], X[:, 1], alpha=0.8, c=y, edgecolor="k") ax.set_title(f"Resampling using {clf[0].__class__.__name__}") SMOTE allows to generate samples. However, this method of over-sampling does not have any knowledge regarding the underlying distribution. Therefore, some noisy samples can be generated, e.g. when the different classes cannot be well separated. Hence, it can be beneficial to apply an under-sampling algorithm to clean the noisy samples. Two methods are usually used in the literature: (i) Tomek’s link and (ii) edited nearest neighbours cleaning methods. Imbalanced-learn provides two ready-to-use samplers SMOTETomek and SMOTEENN. In general, SMOTEENN cleans more noisy data than SMOTETomek. from sklearn.linear_model import LogisticRegression from imblearn.combine import SMOTEENN, SMOTETomek from imblearn.over_sampling import SMOTE from imblearn.pipeline import make_pipeline samplers = [SMOTE(random_state=0), SMOTEENN(random_state=0), SMOTETomek(random_state=0)] fig, axs = plt.subplots(3, 2, figsize=(15, 25)) for ax, sampler in zip(axs, samplers): clf = make_pipeline(sampler, LogisticRegression()).fit(X, y) plot_decision_function(X, y, clf, ax[0]) plot_resampling(X, y, sampler, ax[1]) fig.tight_layout() plt.show() Resampling using SMOTE, Decision function for SMOTE, Resampling using SMOTEENN, Decision function for SMOTEENN, Resampling using SMOTETomek, Decision function for SMOTETomek

import matplotlib.pyplot as plt import np as np import numpy as np from scipy import signal from scipy import fftpack import matplotlib.font_manager as fm t = np.linspace(-1, 1, 200, endpoint=False) x = (np.cos(2,np.pi5t) + np.sin(2np.pi20t) * np.exp(-t**3/0.4)) X = fftpack.fft(x) fig, axs = plt.subplots(2, 2, figsize=(16, 8)) axs[0, 0].plot(t, x, color='pink') axs[0, 0].set_title('原信号', fontproperties=fm.FontProperties(fname='C:/Windows/Fonts/simsun.ttc'), color='plum') axs[0, 0].tick_params(axis='x', colors='red') axs[0, 0].tick_params(axis='y', colors='blue') axs[0, 1].plot(t, np.abs(X), color='brown') axs[0, 1].set_title('傅里叶变换', fontproperties=fm.FontProperties(fname='C:/Windows/Fonts/simsun.ttc'), color='violet') axs[0, 1].set_ylim([0, 25]) axs[0, 1].tick_params(axis='x', colors='red') axs[0, 1].tick_params(axis='y', colors='blue') b1, a1 = signal.butter(16, 0.2) y = signal.filtfilt(b1, a1, x) axs[1, 0].plot(t, y, color='grey') axs[1, 0].set_title('高通滤波', fontproperties=fm.FontProperties(fname='C:/Windows/Fonts/simsun.ttc'), color='indigo') axs[1, 0].tick_params(axis='x', colors='red') axs[1, 0].tick_params(axis='y', colors='blue') b2, a2 = signal.butter(4, 0.3) z = signal.filtfilt(b2, a2, x) axs[1, 1].plot(t, z, color='orange') axs[1, 1].set_title('低通滤波', fontproperties=fm.FontProperties(fname='C:/Windows/Fonts/simsun.ttc'), color='navy') axs[1, 1].tick_params(axis='x', colors='red') axs[1, 1].tick_params(axis='y', colors='blue') plt.tight_layout() plt.show()有错误

def calculate_snr(signal, noise): """Calculate the SNR between a signal and its associated noise.""" if len(signal) != len(noise): raise ValueError("Signal and noise must have the same length.") signal_power = np.mean(np.abs(signal) ** 2) noise_power = np.mean(np.abs(noise) ** 2) if noise_power == 0: return float('inf') return 10 * np.log10(signal_power / noise_power) def add_noise_with_snr(original_signal, target_snr_db): """ Add Gaussian white noise to an input signal so that it reaches a specified SNR. :param original_signal: Original clean signal array. :param target_snr_db: Target SNR value in decibels. :return: Tuple containing noisy signal and added noise arrays. """ signal_power = np.mean(np.abs(original_signal) ** 2) snr_linear = 10 ** (target_snr_db / 10.0) noise_power = signal_power / snr_linear noise_std = np.sqrt(noise_power) noise = np.random.normal(0, noise_std, size=len(original_signal)) noisy_signal = original_signal + noise return noisy_signal, noise def wavelet_denoising(signal, level=3): """Perform Wavelet Transform based denoising on a given signal.""" wp = pywt.WaveletPacket(data=signal, wavelet='db1', mode='symmetric', maxlevel=level) nodes = [node.path for node in wp.get_level(level, 'natural')] thresholded_coeffs = {} for n in nodes: coeffs = wp[n].data sigma = np.median(np.abs(coeffs)) / 0.6745 threshold = sigma * np.sqrt(2 * np.log(len(coeffs))) coeffs[np.abs(coeffs) < threshold] = 0 # Soft-thresholding thresholded_coeffs[n] = coeffs.flatten() reconstructions = [] for k, v in sorted(thresholded_coeffs.items()): packet = pywt.WaveletPacket(None, wavelet='db1', mode='symmetric') packet[k] = v reconstructed = packet.reconstruct(update=False).real reconstructions.append(reconstructed) final_reconstruction = sum(reconstructions) / len(nodes) return final_reconstruction[:len(signal)] # Ensure output matches input length if __name__ == "__main__": # Generate test signals t = np.linspace(0, 1, num=2 ** 8) f1, f2 = 7, 13 # Frequencies of sinusoidal components clean_signal = np.sin(2 * np.pi * f1 * t) + np.cos(2 * np.pi * f2 * t) target_snrs = [5, 10, 20] results = {} fig, axs = plt.subplots(nrows=len(target_snrs), ncols=1, figsize=(10, 6 * len(target_snrs)), sharex=True) # 确保axs总是可以按索引访问的形式 if not isinstance(axs, np.ndarray): axs = [axs] for idx, target_snr_db in enumerate(target_snrs): noisy_signal, _ = add_noise_with_snr(clean_signal, target_snr_db) denoised_signal = wavelet_denoising(noisy_signal, level=3) actual_snr_before = calculate_snr(clean_signal, noisy_signal - clean_signal) actual_snr_after = calculate_snr(clean_signal, denoised_signal - clean_signal) print(f"\nResults for Target SNR={target_snr_db:.0f} dB:") print(f"- Actual Noisy SNR: {actual_snr_before:.2f} dB") print(f"- Actual Denoised SNR: {actual_snr_after:.2f} dB\n") ax = axs[idx] ax.plot(t, clean_signal, label="Original Signal", color='black', alpha=0.9) ax.plot(t, noisy_signal, label=f"Noisy Signal ({actual_snr_before:.2f} dB)", ls="--", lw=0.8) ax.plot(t, denoised_signal, label=f"Denoised Signal ({actual_snr_after:.2f} dB)", color='red') ax.set_title(f'Target SNR = {target_snr_db} dB') ax.grid(True) ax.legend(loc='upper right') plt.tight_layout(pad=3.0) plt.xlabel('Time (seconds)') plt.show()逐句解释该代码

最新推荐

recommend-type

员工工资管理系统VBSQL样本 (1)(1).doc

员工工资管理系统VBSQL样本 (1)(1).doc
recommend-type

门户网站建设方案(1).doc

门户网站建设方案(1).doc
recommend-type

计算机逻辑结构与基础课件4_2ALU的组织new(1).ppt

计算机逻辑结构与基础课件4_2ALU的组织new(1).ppt
recommend-type

化工自动化控制仪表作业试题..(1).doc

化工自动化控制仪表作业试题..(1).doc
recommend-type

模拟微信支付金额输入交互界面设计方案

资源下载链接为: https://pan.quark.cn/s/6e651c43a101 在 PayUI 的预览功能中,这个弹出层是基于 DialogFragment 实现的。所有相关逻辑都已封装在这个 DialogFragment 内部,因此使用起来十分便捷。 使用时,通过 InputCallBack 接口可以获取到用户输入的支付密码。你可以在该接口的回调方法中,发起请求来验证支付密码的正确性;当然,也可以选择在 PayFragment 内部直接修改密码验证的逻辑。 整个实现过程没有运用复杂高深的技术,代码结构清晰易懂,大家通过阅读代码就能轻松理解其实现原理和使用方法。
recommend-type

精选Java案例开发技巧集锦

从提供的文件信息中,我们可以看出,这是一份关于Java案例开发的集合。虽然没有具体的文件名称列表内容,但根据标题和描述,我们可以推断出这是一份包含了多个Java编程案例的开发集锦。下面我将详细说明与Java案例开发相关的一些知识点。 首先,Java案例开发涉及的知识点相当广泛,它不仅包括了Java语言的基础知识,还包括了面向对象编程思想、数据结构、算法、软件工程原理、设计模式以及特定的开发工具和环境等。 ### Java基础知识 - **Java语言特性**:Java是一种面向对象、解释执行、健壮性、安全性、平台无关性的高级编程语言。 - **数据类型**:Java中的数据类型包括基本数据类型(int、short、long、byte、float、double、boolean、char)和引用数据类型(类、接口、数组)。 - **控制结构**:包括if、else、switch、for、while、do-while等条件和循环控制结构。 - **数组和字符串**:Java数组的定义、初始化和多维数组的使用;字符串的创建、处理和String类的常用方法。 - **异常处理**:try、catch、finally以及throw和throws的使用,用以处理程序中的异常情况。 - **类和对象**:类的定义、对象的创建和使用,以及对象之间的交互。 - **继承和多态**:通过extends关键字实现类的继承,以及通过抽象类和接口实现多态。 ### 面向对象编程 - **封装、继承、多态**:是面向对象编程(OOP)的三大特征,也是Java编程中实现代码复用和模块化的主要手段。 - **抽象类和接口**:抽象类和接口的定义和使用,以及它们在实现多态中的不同应用场景。 ### Java高级特性 - **集合框架**:List、Set、Map等集合类的使用,以及迭代器和比较器的使用。 - **泛型编程**:泛型类、接口和方法的定义和使用,以及类型擦除和通配符的应用。 - **多线程和并发**:创建和管理线程的方法,synchronized和volatile关键字的使用,以及并发包中的类如Executor和ConcurrentMap的应用。 - **I/O流**:文件I/O、字节流、字符流、缓冲流、对象序列化的使用和原理。 - **网络编程**:基于Socket编程,使用java.net包下的类进行网络通信。 - **Java内存模型**:理解堆、栈、方法区等内存区域的作用以及垃圾回收机制。 ### Java开发工具和环境 - **集成开发环境(IDE)**:如Eclipse、IntelliJ IDEA等,它们提供了代码编辑、编译、调试等功能。 - **构建工具**:如Maven和Gradle,它们用于项目构建、依赖管理以及自动化构建过程。 - **版本控制工具**:如Git和SVN,用于代码的版本控制和团队协作。 ### 设计模式和软件工程原理 - **设计模式**:如单例、工厂、策略、观察者、装饰者等设计模式,在Java开发中如何应用这些模式来提高代码的可维护性和可扩展性。 - **软件工程原理**:包括软件开发流程、项目管理、代码审查、单元测试等。 ### 实际案例开发 - **项目结构和构建**:了解如何组织Java项目文件,合理使用包和模块化结构。 - **需求分析和设计**:明确项目需求,进行系统设计,如数据库设计、系统架构设计等。 - **代码编写和实现**:根据设计编写符合要求的代码,实现系统的各个模块功能。 - **测试和维护**:进行单元测试、集成测试,确保代码质量,对项目进行维护和升级。 ### 其他相关知识点 - **Java虚拟机(JVM)**:了解JVM的基本工作原理,包括类加载机制、内存管理、垃圾回收算法等。 - **常用Java框架**:比如Spring、Hibernate、MyBatis等,在实际开发中常常与Java基础结合使用,提高开发效率。 以上知识点可以作为学习Java案例开发的基础框架。在实际的开发实践中,开发者需要结合具体的项目需求,对这些知识点进行灵活运用。通过反复的案例实践,可以加深对Java编程的理解,并逐步提升开发技能。这份集锦可能包含的案例可能涉及上述知识点的具体应用,能够帮助学习者更好地理解理论与实践的结合,从而快速提升个人的Java开发能力。
recommend-type

【VASP报错深度解析】:5大技巧识别并永久解决离子距离太近警告

# 1. VASP软件简介及离子距离太近问题概述 ## 1.1 VASP软件简介 **VASP(Vienna Ab initio Simulation Package)** 是一款广泛应用于计算材料科学的软件,它基于密度泛函理论(DFT)计算固体、表面和分子的电子结构和性质。
recommend-type

npm error A complete log of this run can be found in: D:\Program Files\nodejs\node_cache\_logs\2025-04-20T15_11_51_454Z-debug-0.log

<think>好的,我需要帮助用户找到npm的错误调试日志位置,并解决他们遇到的npm错误。首先,用户已经提供了一个具体的日志路径:'D:\Program Files\nodejs\node_cache\_logs\2025-04-20T15_11_51_454Z-debug-0.log',但看起来这个路径可能有问题,因为日期是2025年,这可能是一个示例或输入错误。我需要确认正确的日志路径生成方式。 根据npm的默认配置,日志文件通常位于npm的缓存目录下的_logs文件夹中。默认情况下,Windows系统中npm的缓存路径是%AppData%\npm-cache,而日志文件会以当前日期和
recommend-type

深入理解内存技术文档详解

由于文件内容无法查看,仅能根据文件的标题、描述、标签以及文件名称列表来构建相关知识点。以下是对“内存详解”这一主题的详细知识点梳理。 内存,作为计算机硬件的重要组成部分,负责临时存放CPU处理的数据和指令。理解内存的工作原理、类型、性能参数等对优化计算机系统性能至关重要。本知识点将从以下几个方面来详细介绍内存: 1. 内存基础概念 内存(Random Access Memory,RAM)是易失性存储器,这意味着一旦断电,存储在其中的数据将会丢失。内存允许计算机临时存储正在执行的程序和数据,以便CPU可以快速访问这些信息。 2. 内存类型 - 动态随机存取存储器(DRAM):目前最常见的RAM类型,用于大多数个人电脑和服务器。 - 静态随机存取存储器(SRAM):速度较快,通常用作CPU缓存。 - 同步动态随机存取存储器(SDRAM):在时钟信号的同步下工作的DRAM。 - 双倍数据速率同步动态随机存取存储器(DDR SDRAM):在时钟周期的上升沿和下降沿传输数据,大幅提升了内存的传输速率。 3. 内存组成结构 - 存储单元:由存储位构成的最小数据存储单位。 - 地址总线:用于选择内存中的存储单元。 - 数据总线:用于传输数据。 - 控制总线:用于传输控制信号。 4. 内存性能参数 - 存储容量:通常用MB(兆字节)或GB(吉字节)表示,指的是内存能够存储多少数据。 - 内存时序:指的是内存从接受到请求到开始读取数据之间的时间间隔。 - 内存频率:通常以MHz或GHz为单位,是内存传输数据的速度。 - 内存带宽:数据传输速率,通常以字节/秒为单位,直接关联到内存频率和数据位宽。 5. 内存工作原理 内存基于电容器和晶体管的工作原理,电容器存储电荷来表示1或0的状态,晶体管则用于读取或写入数据。为了保持数据不丢失,动态内存需要定期刷新。 6. 内存插槽与安装 - 计算机主板上有专用的内存插槽,常见的有DDR2、DDR3、DDR4和DDR5等不同类型。 - 安装内存时需确保兼容性,并按照正确的方向插入内存条,避免物理损坏。 7. 内存测试与优化 - 测试:可以使用如MemTest86等工具测试内存的稳定性和故障。 - 优化:通过超频来提高内存频率,但必须确保稳定性,否则会导致数据损坏或系统崩溃。 8. 内存兼容性问题 不同内存条可能由于制造商、工作频率、时序、电压等参数的不匹配而产生兼容性问题。在升级或更换内存时,必须检查其与主板和现有系统的兼容性。 9. 内存条的常见品牌与型号 诸如金士顿(Kingston)、海盗船(Corsair)、三星(Samsung)和芝奇(G.Skill)等知名品牌提供多种型号的内存条,针对不同需求的用户。 由于“内存详解.doc”是文件标题指定的文件内容,我们可以预期在该文档中将详细涵盖以上知识点,并有可能包含更多的实践案例、故障排查方法以及内存技术的最新发展等高级内容。在实际工作中,理解并应用这些内存相关的知识点对于提高计算机性能、解决计算机故障有着不可估量的价值。
recommend-type

【机械特性分析进阶秘籍】:频域与时域对比的全面研究

# 1. 机械特性分析的频域与时域概述 ## 1.1 频域与时域分析的基本概念 机械特性分析是通