随笔分类 -  matlab

摘要:import matplotlib.pyplot as plt x = [1, 2, 3, 4, 5] y = [2, 3, 2, 4, 2] plt.scatter(x, y) plt.title('Scatter Plot Example') # 添加标题 plt.xlabel('X Axis' 阅读全文
posted @ 2024-07-16 11:32 西北逍遥 阅读(16) 评论(0) 推荐(0) 编辑
摘要:A = [1 2 3; 4 5 6; 7 8 9]; for i = 1:size(A, 1) disp(A(i, :)) end # 阅读全文
posted @ 2024-07-01 22:16 西北逍遥 阅读(6) 评论(0) 推荐(0) 编辑
摘要:clc; clear; % 定义边列表(源节点,目标节点,权重) w1=[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]; s1= [1,1,1, 阅读全文
posted @ 2024-06-18 23:06 西北逍遥 阅读(12) 评论(0) 推荐(0) 编辑
摘要:matlab查找数组中大于某个数的位置 >> k2=[1,4,2,7,6.6,7.8,3.2,5.6,9,11,14,17,2,7] k2 = 1.0000 4.0000 2.0000 7.0000 6.6000 7.8000 3.2000 5.6000 9.0000 11.0000 14.0000 阅读全文
posted @ 2023-03-21 19:12 西北逍遥 阅读(1467) 评论(0) 推荐(0) 编辑
摘要:matlab图表添加文字 plot([1:200],result3_avg(1:200),'Color',line3_color,'LineWidth',2.0); hold on; plot(k3_0,result3_avg(k3_0), 'm-h', 'MarkerFaceColor', 'm' 阅读全文
posted @ 2023-01-02 13:52 西北逍遥 阅读(535) 评论(0) 推荐(0) 编辑
摘要:function [ k0,k_s_value,k_e_value ] = ZZT_1( result1_avg ) %UNTITLED5 此处显示有关此函数的摘要 % 此处显示详细说明 % for index_1 = result1_avg % disp(index_1); % end; step 阅读全文
posted @ 2023-01-01 20:08 西北逍遥 阅读(52) 评论(0) 推荐(0) 编辑
摘要:matlab曲面拟合 加载数据: load franke; 拟合曲面: surffit = fit([x,y],z,'poly23','normalize','on') 输出: Linear model Poly23: surffit(x,y) = p00 + p10*x + p01*y + p20 阅读全文
posted @ 2022-05-16 17:21 西北逍遥 阅读(5956) 评论(0) 推荐(0) 编辑
摘要:atan2 四象限反正切 全页折叠 语法 P = atan2(Y,X) >> atan2(4,-3) ans = 2.2143 >> >> atan2(-5,-5)*180.0/3.1415926 ans = -135.0000 >> ####################### 阅读全文
posted @ 2022-05-15 00:26 西北逍遥 阅读(323) 评论(0) 推荐(0) 编辑
摘要:matlab矩阵变换 clear; close all; clc; a=[1 2 3] b=[2 0 0;0 2 0;0 0 2] c=a*b 运行日志: ######################## 阅读全文
posted @ 2022-02-16 09:14 西北逍遥 阅读(87) 评论(0) 推荐(0) 编辑
摘要:matlab polarplot 在极坐标中绘制螺线 theta = linspace(0,1800,500); rho = 0.005*theta/100; theta_radians = deg2rad(theta); polarplot(theta_radians,rho) 参考:https: 阅读全文
posted @ 2021-11-02 08:44 西北逍遥 阅读(379) 评论(0) 推荐(0) 编辑
摘要:matlab polarplot 在极坐标中绘制线条 函数: function h = polarplot(varargin) %POLARPLOT Polar plot. % POLARPLOT(TH,R) plots vector TH vs R. The values in TH % are 阅读全文
posted @ 2021-11-02 08:29 西北逍遥 阅读(929) 评论(0) 推荐(0) 编辑
摘要:matlab绘制函数 clc; clear; x=-50:0.5:50; y = x.^3-x.^2-x+1; plot(x,y) ######################## 阅读全文
posted @ 2021-08-28 20:43 西北逍遥 阅读(637) 评论(0) 推荐(0) 编辑
摘要:matlab chol() [S]=chol(Ppr2)'; np.linalg.cholesky print(" "*20) Ppr2=np.array([[0.0119,-0.0832,-0.0287,-0.0072,0.0011],[-0.0832,5.2764,1.8354,0.7185,- 阅读全文
posted @ 2021-07-09 20:58 西北逍遥 阅读(235) 评论(0) 推荐(0) 编辑
摘要:matlab 卡尔曼滤波 clear; close all; clc; n = 100; %观测值 Z=(1:n); %方差为1的高斯噪声、 noise = randn(1,n); Z = Z+noise; %Z=[1532 1487 1507 1527 1514 1455 1317 1255 17 阅读全文
posted @ 2021-06-13 21:49 西北逍遥 阅读(508) 评论(0) 推荐(0) 编辑
摘要:忙,好多天没打开了 %% clear; clc; close all load geoid % Create a figure with an Eckert projection. figure axesm eckert4; framem; gridm; axis off % Display the 阅读全文
posted @ 2021-06-07 19:47 西北逍遥 阅读(86) 评论(0) 推荐(0) 编辑
摘要:Matlab Eckert4 landareas = shaperead('landareas.shp','UseGeoCoords',true); axesm ('eckert4', 'Frame', 'on', 'Grid', 'on'); geoshow(landareas,'FaceColo 阅读全文
posted @ 2021-05-22 20:22 西北逍遥 阅读(44) 评论(0) 推荐(0) 编辑
摘要:Matlab获取矩阵几行几列 >> >> File_Data File_Data = 15.0000 1.0000 0.6341 0.9451 0.8784 0.5112 0.7295 0.5434 0.5559 0.3106 0.5248 0.6037 0.4813 0.6232 15.0000 阅读全文
posted @ 2021-05-20 09:42 西北逍遥 阅读(994) 评论(0) 推荐(0) 编辑
摘要:Matlab kmeans聚类 rng('default') % For reproducibility X = [randn(100,2)*0.75+ones(100,2); randn(100,2)*0.5-ones(100,2); randn(100,2)*0.75]; [idx,C] = k 阅读全文
posted @ 2021-05-20 09:03 西北逍遥 阅读(169) 评论(0) 推荐(0) 编辑
摘要:z = 3*(1-x).^2.*exp(-(x.^2) - (y+1).^2) - 10*(x/5 - x.^3 - y.^5).*exp(-x.^2-y.^2) - 1/3*exp(-(x+1).^2 - y.^2) ########################### 阅读全文
posted @ 2021-05-15 19:12 西北逍遥 阅读(220) 评论(0) 推荐(0) 编辑
摘要:[x2,y2,z2] = sphere; c2 = z2; surf(x2,y2,z2,c2) caxis([-1 3]) ###################### 阅读全文
posted @ 2021-05-14 13:19 西北逍遥 阅读(353) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示