matlab论文图一的地形区域图的球形展示Version_1
matlab论文图一的地形区域图的球形展示Version_1
图片
此图来源于:

这个图的地形数据很精细,因为我画的图没展示这么精细。
底图海图可以画,然后左上角放个球形地图:
写成函数可以进行调用:
add_sphere1(cmap)
cmap指的是colormap;
调用格式: 先设置位置,在添加colormap,在调整视角即可。
%% %% add sphere set position
axes('position',[0.02 0.49 0.42 0.42])
% add colormap
cmap=load('MPL_terrain.txt');
add_sphere1(cmap)
view(40,25);% view angles
% view(x,y);% x 控制左右旋转,y控制上下旋转。
结果展示:
图片
图片
图片
图片
代码:
底图海图
.rtcContent { padding: 30px; } .lineNode {font-size: 12pt; font-family: "Times New Roman", Menlo, Monaco, Consolas, "Courier New", monospace; font-style: normal; font-weight: normal; }
clc;clear;close all
% read data
file='F:\data\etopo\etopo1.nc';
lon=double(ncread(file,'x'));
lat=double(ncread( file,'y'));
h=double(ncread(file,'z'));
% 选定区域南海%
area =[116 121 22 25];
ln =find(lon>=area(1)&lon<=area(2));
la=find(lat>=area(3)&lat<=area(4));
lon = lon(ln);
lat = lat(la);
H = h(ln,la);
[x,y]=meshgrid(lon,lat);
x=x'; y=y';
%% %%m_pcolor画出了区域的等深线图
close all
figure;
set(0,'defaultfigurecolor','w')
set(gcf,'position',[50 50 1200 900])
m_proj('Miller','lon',[area(1) area(2)],'lat',[area(3) area(4)]);
caxis([-2500 0])% 这些必须放在m_shaderelief的前面,不然不可用
colorbar
cmap=load('MPL_terrain.txt');% add colormap
m_shadedrelief(lon,lat,H',cmap);
m_gshhs_c('patch',[0.8 0.8 0.8]);
m_grid('linest','none','xtick',[116:1:121],'ytick',[22:25],'tickdir','in',...'FontName','Times new roman','FontSize',12,'color','k','box','on');%box on off and fancy;
m_shadedrelief.m.rtcContent { padding: 30px; } .lineNode {font-size: 12pt; font-family: "Times New Roman", Menlo, Monaco, Consolas, "Courier New", monospace; font-style: normal; font-weight: normal; }
function [Truecol,x,y]=m_shadedrelief(x,y,Z,cmap,varargin)
% M_SHADEDRELIEF Shaded relief topography in an image
% M_SHADEDRELIEF(X,Y,Z) presents a shaded relief topography, as would
% be seen if a 3D model was artifically lit from the side. Slopes
% facing the light are lightened, and slopes facing away from the
% light are darkened. X and Y are horizontal and vertical coordinate
% VECTORS, and these should be in the same units as the height Z
% (e.g., all in meters), otherwise the slope angle calculations will be
% in error.
%
% Usage notes:
%
% (1) M_SHADEDRELIEF is a replacement for a low-level call to IMAGE
% displaying a true-colour image so it MUST be preceded by COLORMAP and
% CAXIS calls.
%
% (2) Gradients have to be calculated, so Z should be a data-type accepted
% by Matlab's GRADIENT function (currently double and single).
% If Z is (e.g.) 'int8', or some other data-type you must use
% M_SHADED_RELIEF(X,Y,double(Z))
%
% (3) M_SHADEDRELIEF probably is most useful as a backdrop to maps with
% a rectangular outline box - either a cylindrical projection, or some
% other projection with M_PROJ(...'rectbox','on').
%
% (4) Finally, the simplest way of not running into problems:
% - if your elevation data is in LAT/LON coords (i.e. in a matrix where
% each row has points with the same latitude, and each column has points
% with the same longitude), use
% M_PROJ('equidistant cylindrical',...)
% - if your elevation data is in UTM coords (meters E/N), i.e. in a matrix
% where each row has the same UTM northing and the each column has the
% same UTM easting, use
% M_PROJ('utm',....)
%
% M_SHADEDRELIEF(...,'parameter',value) lets you set various properties.
% These are:
% 'coords' : Coordinates of X/Y/Z:
% 'geog' for lat/lon, Z meters, (default)
% 'map' for X/Y map coordinates, Z meters
% 'Z' if X/Y/Z are all in same units (e.g., meters)
% 'lightangle' : true direction (degrees) of light source (default
% -45, i.e. from the north-west)
% 'gradient': Shading effects increase with slope angle
% until slopes reach this value (in degrees), and are
% held constant for higher slopes (default 10). Reduce
% for smoother surfaces.
% 'clipval' : Fractional change in shading for slopes>='gradient'.
% 0 means no change, 1 means saturation to white or black
% if slope is facing directly towards or away from light
% source, (default 0.9).
% 'nancol' : RGB colour of NaN values (default [1 1 1]);
% 'lakecol' : RGB colour of lakes (flat sections) (default NaN)
% If set to NaN lakes are ignored.
%
% IM=M_SHADEDRELIEF(...) returns a handle to the image.
%
% [SR,X,Y]=m_SHADEDRELIEF(...) does not create an image but only returns
% the true-color matrix SR of the shaded relief, as well as the X/Y
% vectors needed to display it.
%
% Example:
% load topo
% subplot(2,1,1); % Example without it
% imagesc(topolonlim,topolatlim,topo);
% caxis([-5000 5000]);
% colormap([m_colmap('water',64);m_colmap('gland',64)]);
% set(gca,'ydir','normal');
%
% subplot(2,1,2); % Example with it
% caxis([-5000 5000]);
% colormap([m_colmap('water',64);m_colmap('gland',64)]);
% m_shadedrelief(topolonlim,topolatlim,topo,'gradient',5e2,'coord','Z');
% axis tight
%
% Rich Pawlowicz (rich@eoas.ubc.ca) Dec/2017
%
% This software is provided "as is" without warranty of any kind. But
% it's mine, so you can't sell it.
%
% Changes:
% Jan/2018 - changed outputs for flexibility
% and added 'map' coordinate handling
% Mar/2019 - added alphamapping for out-of-map areas, started using colormap
% local to AXES not to FIGURE.
% Apr/2019 - some parts relied on the ones-expansion; went back to meshgrid
% for compatibility with older matlab versions (thanks P. Grahn)
% Oct/2020 - added info about how input Z must be a double
global MAP_PROJECTION MAP_VAR_LIST
lighthead=-45;
gradfac=10;
clipval=.9;
nancol=[1 1 1];
lakecol=NaN; %[.7 .9 1];
geocoords='geog';
scfac=6400000; % Used for geo coordinates if on sphere radius 1
while ~isempty(varargin)switch lower(varargin{1}(1:3))case 'coo'switch lower(varargin{2}(1))case 'g'geocoords='geog';case 'm'geocoords='map';case {'z','u'}geocoords='z';otherwiseerror('Unknown coordinate specification');endcase 'lig'lighthead=varargin{2};case 'gra'gradfac=varargin{2};case 'cli'clipval=varargin{2};case 'nan'nancol=varargin{2};case 'lak'lakecol=varargin{2};otherwiseerror(['m_shadedrelief: Unknown option: ' varargin{1}]);endvarargin(1:2)=[];
end
% All kinds of issues dealing with coords:
% First, we need VECTOR x/y as an input to gradient function.
if isvector(x) && size(x,2)==1x=x';
elseif ~isvector(x) % Can't be a matrixerror('Input X must be a VECTOR');
end
if isvector(y) && size(y,1)==1y=y';
elseif ~isvector(y)error('Input Y must be a VECTOR');
end
% Now handle the case if we just give a starting and an ending point
if length(x)==2x=linspace(0,1,size(Z,2))*diff(x)+x(1);
end
if length(y)==2y=linspace(0,1,size(Z,1))'*diff(y)+y(1);
end
if strcmp(geocoords,'geog') % If its Lat/Long points% Have to have initialized a map firstif isempty(MAP_PROJECTION)disp('No Map Projection initialized - call M_PROJ first!');return;end% Convert to X/Y[X,Y]=m_ll2xy(x(1,:),repmat(mean(y(:,1)),1,size(x,2)),'clip','off');[X2,Y2]=m_ll2xy(repmat(mean(x(1,:)),size(y,1),1),y(:,1),'clip','off');x=X;y=Y2;
end
% Note - 'image' spaces points evenly, so we should just check that they
% are even otherwise the image won't line up with coastlines...
if max(abs( x - linspace(x(1),x(end),length(x)) ) )/abs(x(end)-x(1)) >.005warning(['********** Image will be distorted in X direction!! use M_IMAGE to re-map? *************']);
end
if max(abs( y - linspace(y(1),y(end),length(y))' ) )/abs(y(end)-y(1)) >.005warning(['********** Image will be distorted in Y direction!! use M_IMAGE to re-map? *************']);
end
% Convert colours to uint8s
if all(nancol<=1)nancol=uint8(nancol*255);
end
% Convert colours to uint8s
if all(lakecol<=1)lakecol=uint8(lakecol*255);
end
% Get caxis
clims=caxis;
if all(clims==[0 1]) % Not setclims=[min(Z(:)) max(Z(:))];
end
% Get colormap for the current axes
% cmap1=load('GMT_drywet1.mat');
% cmap1 =(cmap1.raw_new);
% cc=colormap((cmap1));
if isempty(cmap)cmap=load('MPL_terrain.txt');
elsecmap = cmap;
end
cc=colormap((cmap));
% cc=colormap(gca);
cc2=round(cc*255); % we need these in 0-255 range to get Truecolor
lcc=size(cc,1);
%inan=isnan(Z);
% Get slopes
% If we are using a normal ellipsoid we need to rescale
% x/y to get true slope angles
if ~isfloat(Z)warning('Your input Z matrix must be floating point');
end
if (strcmp(geocoords,'map') || strcmp(geocoords,'geog')) && strcmp(MAP_VAR_LIST.ellipsoid,'normal')scfac=6370997;[Fx,Fy]=gradient( Z, x*scfac, y*scfac);
else[Fx,Fy]=gradient( Z, x, y);
end
% Find NaN
[inan,jnan]=find(isnan(Z) | isnan(Fx) | isnan(Fy) );
% Probable lakes
[islake,jlake]=find(Fx==0 & Fy==0);
% Convert z levels into a colormap index.
% Some iteration to discover the exact formula that matlab uses for mapping to
% color indices (from 1 to lcc)
%idx=min( floor( min(max( (Z-clims(1))/(clims(2)-clims(1)),0) ,1 )*lcc )+1,lcc);
idx=max(min( floor( (Z-clims(1))/(clims(2)-clims(1))*lcc )+1 ,lcc),1);
% The slope angle relative to the light direction in degrees.
Fnw=atand(imag(-(Fx+i*Fy)*exp(i*lighthead*pi/180)));
%Put an upper and lower limit on the angles
%%Fnw=min(clipval,max(-clipval,Fnw/gradfac));
Fnw=clipval*tanh(Fnw/gradfac);
% Now get the colormap for each pixel and scale the RGB value 'c'.
% If the correction is -0.1 then scale c*(1 - |-0.1|)
% If the correction is 0.1 then scale c*(1 - |+0.1|) + 0.1*255
%depending on the slope.
%Truecol=uint8(max(0,min(255, reshape([cc2(idx,:)],[size(idx) 3]).*repmat(1-abs(Fnw),1,1,3)+repmat(255*Fnw.*(Fnw>0),1,1,3) ) ));
Truecol=uint8( reshape([cc2(idx,:)],[size(idx) 3]).*repmat(1-abs(Fnw),1,1,3)+repmat(255*Fnw.*(Fnw>0),1,1,3) ) ;
%Truecol=uint8(max(0,min(255, reshape([cc2(idx,:)],[size(idx) 3]).*repmat(1+Fnw/gradfac,1,1,3) ) ));
% Colour Lakes
if any(islake) && isfinite(lakecol(1))Truecol(sub2ind(size(Truecol),islake,jlake, ones(size(islake))))=lakecol(1);Truecol(sub2ind(size(Truecol),islake,jlake,1+ones(size(islake))))=lakecol(2);Truecol(sub2ind(size(Truecol),islake,jlake,2+ones(size(islake))))=lakecol(3);
end
% Colour the NaNs
if any(inan)Truecol(sub2ind(size(Truecol),inan,jnan, ones(size(inan))))=nancol(1);Truecol(sub2ind(size(Truecol),inan,jnan,1+ones(size(inan))))=nancol(2);Truecol(sub2ind(size(Truecol),inan,jnan,2+ones(size(inan))))=nancol(3);
end
if strcmp(geocoords,'map') % Have to "make invisible" the points outside the map limits.[xm,ym]=meshgrid(x,y);[HLG,HLT]=m_xy2ll(xm,ym);% Find pixels outside the limits of the actual map (if the boundary% isn't a rectangle)if strcmp(MAP_VAR_LIST.rectbox,'off')[I,J]=find(HLT<MAP_VAR_LIST.lats(1) | HLT>MAP_VAR_LIST.lats(2) | HLG<MAP_VAR_LIST.longs(1) | HLG>MAP_VAR_LIST.longs(2));elseif strcmp(MAP_VAR_LIST.rectbox,'circle')R=(xm.^2 +ym.^2);[I,J]=find(R>MAP_VAR_LIST.rhomax.^2);elseI=[];J=[];endbackcolor=uint8(get(gcf,'color')*255);if any(I) % if some pixels are outside the map areafor k=1:3IJ=sub2ind(size(Truecol),I,J,repmat(k,size(I)));Truecol(IJ)=backcolor(k); % Set them to the background colourendend
elseI=[];J=[];
end
if nargout<=1if any(I) % make pixels outside the map area transparent, if needed.alphadata= ones(size(Truecol,1),size(Truecol,2),'logical');IJ=sub2ind(size(alphadata),I,J);alphadata(IJ)=0;Truecol=image('xdata',x,'ydata',y,'cdata',Truecol,'alphadata',alphadata,'tag','m_shadedrelief');elseTruecol=image('xdata',x,'ydata',y,'cdata',Truecol,'tag','m_shadedrelief');end
end
add_sphere1
.rtcContent { padding: 30px; } .lineNode {font-size: 12pt; font-family: "Times New Roman", Menlo, Monaco, Consolas, "Courier New", monospace; font-style: normal; font-weight: normal; }
function add_sphere1(cmap)
load topo topo topomap1 % load data
x = 0:359; % longitude
y = -89:90; % latitude
[X1,Y1]=meshgrid(x,y);
x1 = 0:0.1:360;
y1=-89:0.1:90;
[X,Y]=meshgrid(x1,y1);
topo_new = griddata(X1,Y1,topo,X,Y);
% figure;
% set(0,'defaultfigurecolor','w')
% set(gcf,'position',[50 50 1200 900])
[x,y,z] = sphere(100); % create a sphere
s = surface(x,y,z); % plot spherical surface
s.FaceColor = 'texturemap'; % use texture mapping
s.CData = topo_new; % set color data to topographic data
s.EdgeColor = 'none'; % remove edges
s.FaceLighting = 'gouraud'; % preferred lighting for curved surfaces
s.SpecularStrength = 0.4; % change the strength of the reflected light
if isempty(cmap)cmap=load('MPL_terrain.txt');
elsecmap = cmap;
end
colormap(cmap)
% light('Position',[1 0 1]) % add a light
axis square off % set axis to square and remove axis
view([30,10]) % set the viewing angle
相关文章:
matlab论文图一的地形区域图的球形展示Version_1
matlab论文图一的地形区域图的球形展示Version_1 图片 此图来源于: ![Jieqiong Zhou, Ziyin Wu, Dineng Zhao, Weibing Guan, Chao Zhu, Burg Flemming, Giant sand waves on the Taiwan Banks, southern Taiwan Strait: Distribution, morphometric relationship…...
velocity模板引擎
文章目录 学习链接 学习链接 velocity模板引擎 freemarker模板引擎 thymleaf模板引擎 Apache Velocity Project 官网 Velocity Engine基础 Velocity 模板引擎使用介绍 黑马程序员Java进阶VelocityTools全套教程...
【Docker项目实战】使用Docker部署NotepadMX笔记本工具
【Docker项目实战】使用Docker部署NotepadMX笔记本工具 一、NotepadMX介绍1.1 工具简介1.2 主要特点 二、本次实践规划2.1 本地环境规划2.2 本次实践介绍 三、本地环境检查3.1 检查Docker服务状态3.2 检查Docker版本3.3 检查docker compose 版本 四、下载NotepadMX镜像五、部署…...
边沿耦合与宽边耦合的串扰
边沿耦合与宽边耦合的串扰 我们知道,如果两条走线位于同一层,由于耦合两条线之间会存在串扰。如果PCB层叠中有相邻的信号层,那么同样存在耦合,这两个相邻信号层的走线之间也会存在串扰。同层走线之间的耦合称为边沿耦合࿰…...
基于单片机的按摩器控制系统设计
标题:基于单片机的按摩器控制系统设计 内容:1.摘要 本设计聚焦于基于单片机的按摩器控制系统。背景方面,随着人们生活压力增大,对按摩器的需求日益增长,传统按摩器功能单一、控制不够精准。目的是设计出一种功能多样、控制灵活的按摩器控制系…...
有效的完全平方数--LeetCode
题目 给你一个正整数num。如果num是一个完全平方数,则返回true,否则返回false 。 完全平方数 是一个可以写成某个整数的平方的整数。换句话说,它可以写成某个整数和自身的乘积。 不能使用任何内置的库函数,如sqrt。 示例 1: 输…...
Sentinel源码—5.FlowSlot借鉴Guava的限流算法一
大纲 1.Guava提供的RateLimiter限流使用示例 2.Guava提供的RateLimiter简介与设计 3.继承RateLimiter的SmoothBursty源码 4.继承RateLimiter的SmoothWarmingUp源码 1.Guava提供的RateLimiter限流使用示例 (1)拦截器示例 (2)AOP切面示例 (1)拦截器示例 一.pom文件中引入G…...
dev_set_drvdata、dev_get_drvdata使用详解
在Linux内核驱动开发中,dev_set_drvdata() 及相关函数用于管理设备驱动的私有数据,是模块化设计和数据隔离的核心工具。以下从函数定义、使用场景、示例及注意事项等方面进行详细解析: 一、函数定义与作用 核心函数 dev_set_drvdata() 和 dev…...
OCR技术与视觉模型技术的区别、应用及展望
在计算机视觉技术飞速发展的当下,OCR技术与视觉模型技术成为推动各行业智能化变革的重要力量。它们在原理、应用等方面存在诸多差异,在自动化测试领域也展现出不同的表现与潜力,下面将为你详细剖析。 一、技术区别 (一ÿ…...
B端管理系统:企业运营的智慧大脑,精准指挥
B端管理系统的定义与核心功能 B端管理系统(Business Management System)是专门设计用于支持企业内部运作和外部业务交互的一套软件工具。它集成了多种功能模块,包括但不限于客户关系管理(CRM)、供应链管理(SCM)、人力资源管理(HRM)以及财务管…...
实现Azure Synapse Analytics安全地请求企业内部API返回数据
需要编写一个Synapse Analytics在Azure云上运行,它需要访问企业内部的API获取JSON格式的数据,企业有网关和防火墙,API有公司的okta身份认证,通过公司的域账号来授权访问,现在需要创建一个专用的域账号,让Sy…...
让机器学习更透明:使用 Python 开发可解释性模型工具包
友友们好! 我是Echo_Wish,我的的新专栏《Python进阶》以及《Python!实战!》正式启动啦!这是专为那些渴望提升Python技能的朋友们量身打造的专栏,无论你是已经有一定基础的开发者,还是希望深入挖掘Python潜力的爱好者,这里都将是你不可错过的宝藏。 在这个专栏中,你将会…...
PHP实现简单的爬虫功能
<?php// 目标URL $url https://example.com;// 初始化cURL $ch curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_USERAGENT, Mozilla/5…...
手撕 简易HashMap
put()、get()、remove() 方法 计算存储数组位置和k-vNode节点 public int indexOf(K key){return key.hashCode() & (table.length - 1);}static class Node<K, V>{K key;V value;Node<K, V> next;public Node(K key, V value){this.key key;this.value val…...
go-map+sync.map的底层原理
map 哈希冲突解决方式 1.拉链法 2.开放地址法 底层结构 Go 的 map 在源码中由 runtime.hmap 结构体表示,buckets-指向桶数组的指针(常规桶),oldbuckets-扩容时指向旧桶数组的指针。 type hmap struct {count int // 当前元素个数(len…...
日语学习-日语知识点小记-进阶-JLPT-N2阶段(6): - (1)ても てでも特别强调(2)~もしないで = 聞かないで:根本不做某动作”
日语学习-日语知识点小记-进阶-JLPT-N2阶段(6): - (1)ても てでも特别强调(2)~もしないで 聞かないで:根本不做某动作”。 1、前言(1)情况说…...
读文献方法
虽然读了很多文献,但是并不代表我把读文献这件事真的做到了极致。因此不断优化迭代,反思自己哪里做的不好,非常重要。 阅读学术论文时,采用结构化、分阶段的策略可以显著提高效率。以下是针对这篇流体力学论文的高效阅读方法&…...
对象存储概述
对象存储概述 1. 定义与基本概念 对象存储(Object-based Storage)是一种新型网络存储架构,其核心是将数据作为对象(Object)进行管理,每个对象包含数据本身、元数据(Metadata)和唯一…...
Grallvm技术介绍
GrallVM介绍 GraalVM核心特性 GraalVM 是由 Oracle 开发的高性能运行时环境,基于 HotSpot JVM 构建,支持多语言互操作和 Ahead-of-Time (AOT) 编译。以下是其核心特性: 核心技术 Graal JIT 编译器:替代传统 JVM 的 C2 编译器&am…...
matlab 环形单层柱状图
matlab 环形单层柱状图 matlab 环形单层柱状图 matlab 环形单层柱状图 图片 图片 【图片来源粉丝】 我给他的思路是:直接使用风玫瑰图可以画出。 rose_bar 本次我的更新和这个有些不同!是环形柱状图,可调节细节多; 只需要函数…...
Java调用LLM大模型 - 基于 Spring AI 实现
Spring AI Alibaba实战:Java集成通义千问构建流式对话应用 一、Spring AI核心架构解析 1.1 框架定位与优势对比 graph TDA[Spring AI] --> B[统一API接口]A --> C[多模型支持]A --> D[企业级特性]B --> E(OpenAI/Azure/阿里云)C --> F(LLaMA/Qwen…...
RK | rk3568开发与学习
RK | rk3568开发与学习 时间:2025年4月19日17:20:28 文章目录 RK | rk3568开发与学习1.参考2.资料3.初次使用连接串口网络连接有线连接SSH登录 1.参考 Rockchip: Rockchip-瑞芯微电子股份有限公司 正点原子: 1.正点原子RK3568开发板瑞芯微Linux嵌入式ARM…...
使用Service发布前后端应用程序
使用Service发布前后端应用程序 文章目录 使用Service发布前后端应用程序[toc]一、创建并发布后端应用程序二、创建并发布前端应用程序三、通过前端发送流量进行测试 部署前端(Frontend)微服务和后端(Backend)微服务是比较常见的应…...
测试第四课---------性能测试
作者前言 🎂 ✨✨✨✨✨✨🍧🍧🍧🍧🍧🍧🍧🎂 🎂 作者介绍: 🎂🎂 🎂 🎉🎉🎉…...
数据结构(6)——队列
目录 前言 一、队列的概念及其结构 二、实现 2.1结构体定义 2.2初始化 2.3销毁链表 2.4尾插入(入队) 2.5头删(出队) 2.6个数 2.7检验是否为空 2.8取队头数据 2.9取队尾数据 三、检验 总结 前言 本文介绍队列&#x…...
在RK3588上使用ZLMediaKit
在RK3588上使用ZLMediaKit ZLMediaKit是一个高性能的流媒体服务器框架,可以在RK3588平台上运行。以下是在RK3588上使用ZLMediaKit的指南: 1. 环境准备 首先确保你的RK3588开发板已安装好Linux系统(如Debian或Ubuntu)。 安装依…...
分布式系统核心原理
CAP定理与权衡实践 CAP定理 一致性(Consistency) 强一致性:所有读写操作均基于最新数据(如银行转账)。 最终一致性:数据副本经过一段时间后达到一致(如社交媒体的点赞数)。 技术实现…...
【进程信号】五、信号集操作接口详解
文章目录 Ⅰ. 操作sigset_t变量接口Ⅱ. sigprocmask(阻塞信号集)Ⅲ. sigpending(未决信号集)Ⅳ. 接口使用代码⚜️sigaction(捕捉信号)Ⅴ. 测试sigaction的一些场景Ⅰ. 操作sigset_t变量接口 还记得我们上面讲过的 sigset_t 类型吗,sigset_t 类型对于每种信号用一个…...
Doris 本地部署集群重启后报错
报错描述 Docker 版本: apache/doris:fe-2.1.9 apache/doris:be-2.1.9 连接 MySQL 报错: ERROR 2003 (HY000): Cant connect to MySQL server on 127.0.0.1:9030 (111)FE 日志: INFO (UNKNOWN fe_e7cff187_69d4_42ee_90be_147e87310549(-1…...
bat脚本转换为EXE应用程序文件
很多时候,我们使用电脑时会编辑bat脚本文件 很多时候,我们制作的玩笑,病毒也会使用这个格式. 但这个格式也有很多缺点 1,如果是需要管理员运行的程序,需要费劲的自己使用管理员身份运行 2,文件并不为大家所熟知,认同度不高 3,可以非常轻松的看到原代…...
爬虫入门与requests库的使用——python爬虫
文章目录 浏览器抓包浏览器抓包介绍浏览器抓包页面介绍 python 爬虫爬虫是什么web网页渲染的方式http 协议http协议对资源的操作requests 库requests 是什么requests 的安装requests库的基础使用requests中不同的请求方式GET传递参数POST传递参数响应内容定制请求头Cookie获取服…...
[Java EE] Spring 配置 和 日志
目录 1. 配置文件 1.1 作用 1.2 Spring Boot 配置文件 1.3 读取配置文件 1.3.1 配置对象 1.3.2 配置集合 1.3.3 配置Map 1.4 yml 优缺点 2. 日志 2.1 日志的作用 2.2 日志的使用 2.3 日志框架 2.3.1 门面模式(外观模式) 2.4 SLF4J 框架介绍 2.5 日志格式的说明 …...
如何0基础学stm32?
如何0基础学stm32? 作为一个混迹嵌入式领域十余年的老兵,每次看到"0基础学STM32"这样的提问,我都忍不住想笑,又有些无奈。这就像问"如何0基础学开飞机"一样—虽然理论上可行,但过程恐怕没那么愉快…...
XCZU27DR‑2FFVE1156I Xilinx Zynq UltraScale+ RFSoC
一、概述 XCZU27DR‑2FFVE1156I 属于 Zynq UltraScale™ RFSoC Gen 2 系列,采用 TSMC 16 nm FinFET 工艺,Speed Grade ‑2,集成了 ARM 处理系统、可编程逻辑与高性能射频数据转换单元,为软件定义无线电、5G 前端、测试测量等场景…...
取值运算符*和地址运算符
在指针的学习中,必不可少的两个操作符:*和&。 在定义一个指针的时候,比如 short *p; 表示一个指向short数据类型的指针,具体表达的意思就是这个指针P指向的一个数据类型是short类型,也就是说操作的这…...
LNA设计
设计目的 为后级提供足够的增益以克服后级电路噪声 尽可能小的噪声和信号失真 确保输入和输出端的阻抗匹配 确保信号线性度 评价标准 噪声系数 功率增益 工作频率和带宽 输入信号功率动态范围 端口电压驻波比 稳定性 基于SP模型的LNA设计 直流分析 S参数分析 设计指标 …...
FPGA——DDS信号发生器设计
文章目录 任务要求一、DDS简介二、设计过程1、相位累加器的设计2、波形存储器设计3、锁相环倍频电路设计4、顶层电路设计 三、设计实现四、运行结果总结参考资料 任务要求 1)利用DDS技术合成正弦波和方波; 2)输出信号的频率范围为10Hz~5MHz,…...
【网络编程】TCP数据流套接字编程
目录 一. TCP API 二. TCP回显服务器-客户端 1. 服务器 2. 客户端 3. 服务端-客户端工作流程 4. 服务器优化 TCP数据流套接字编程是一种基于有连接协议的网络通信方式 一. TCP API 在TCP编程中,主要使用两个核心类ServerSocket 和 Socket ServerSocket Ser…...
数据可视化(Matplotlib和pyecharts)
一 常见图形概念及使用 图表类型适用场景核心特点柱状图(bar)比较不同类别数据(如各地区销售额对比)、时间序列分析(离散时间)高度反映数值大小,支持横向/纵向展示,可叠加分组折线图(plot)连续数据趋势比较(适合展示随时间的变化,如股票价格走势、用户增长趋势)、多变…...
如何系统地入门学习stm32?
如何系统地入门学习stm32? 作为一个在嵌入式领域摸爬滚打十余年的工程师,看到这个问题,我不禁想起自己当年啃着厚重的数据手册,对着一块蓝色的PCB板冥思苦想的日子。STM32的学习之路,说难不算特别难,说简单…...
matlab读取CMEMS海洋温度数据并调整图片的比例
matlab读取CMEMS海洋温度数据并调整图片的比例 matlab读取CMEMS海洋温度数据并调整图片的比例 matlab读取CMEMS海洋温度数据并调整图片的比例 数据的下载见上期: 链接到CMEMS数据下载{python} 本文还会给出另一个关键技巧: 通常设置图片比列直接可以通过…...
ReSearch:基于强化学习的大语言模型推理搜索框架
ReSearch是一种创新性框架,通过强化学习技术训练大语言模型执行"推理搜索",无需依赖推理步骤的监督数据。该方法将搜索操作视为推理链的有机组成部分,其中搜索的时机与方式由基于文本的推理过程决定,而搜索结果进一步引…...
【记录】服务器安装ffmpeg
前言 因为项目中需要用到 ffmpeg 进行图像的一些操作,本文记录下在服务器安装 ffmpeg 的全过程,还是具有一定挑战性的。 系统详情 本文使用的操作系统详情如下 通过 命令 cat /etc/os-release 获取 虽然操作系统为 Rocky Linux,但安装过程是通用的,因为本文记录的是从源代码…...
部署rocketmq集群
容器化部署RocketMQ5.3.1集群 背景: 生产环境单机的MQ不具有高可用,所以我们应该部署成集群模式,这里给大家部署一个双主双从异步复制的Broker集群 一、安装docker yum install -y docker systemctl enable docker --now # 单机部署参考: https://www.cnblogs.com/hsyw/p/1…...
中国AIOps行业分析
基本术语 AIOps是"Artificial Intelligence for IT Operations"(IT运维人工智能)的缩写,它指的是将人工智能技术应用于IT运维领域,基于已有的运维数据(如日志、监控信息、应用信息等),通过机器学习的方式解决自动化运维无法解决的问题6。AIOps将机器学习(ML)…...
C++入门[超详细]
#include <iostream c的标准输入输出流 C的域 using namespace std; namespace本质是一个域 只有域里面的定义代码才能使用 std包含了c输入输出的标准库 缺省 只能从左到右缺省,不能中间空格 void f1(int a10,int b20,int c0) { } f1(); f1(1); f1(1,2); f1(1,2,3); f1(…...
字符串系列一>二进制求和
目录 题目:解析:代码: 题目: 链接: link 解析: 代码: class Solution {public String addBinary(String a, String b) {StringBuffer ret new StringBuffer();int t 0;char[] aa a.toCharArray();char[…...
序列化和反序列化
概念 创建出来的这些对象都存在于JVM中的堆(heap)内存中,只有JVM处于运行状态的时候,这些对象才可能存在。当JVM停止,这些对象也就随之消失。 java序列化可以帮我们实现:将这些对象持久化,并且…...
rebase和merge的区别
目录 1. 合并机制与提交历史 2. 冲突处理方式 3. 历史追溯与团队协作 4. 推荐实践 5. 撤销难度 git rebase和git merge是Git中两种不同的分支合并策略,核心区别在于提交历史的处理方式:merge保留原始分支结构并生成合并提交&am…...
linux查看目录相关命令
查看目录命令 学习目标 能够使用Linux命令查看目录信息 1. 查看目录命令的使用 命令说明ls查看当前目录信息tree以树状方式显示目录信息 ls命令效果图: tree命令效果图: 2. 查看当前目录路径 命令说明pwd查看当前目录路径 pwd命令效果图: 3. 清除终端内容 命令说明clear…...