摘要: 这是ytick()和YTickLabel不匹配造成的,即tick比label设置少了,修正即可,最好在设置一下ylim。 阅读全文
posted @ 2023-09-17 11:16 Ada_CN 阅读(21) 评论(0) 推荐(0) 编辑
摘要: saveas(gcf, '<filename>', '<formattype>') %saveas(gcf, 'p1', 'png') %saveas(gcf, 'p1', 'jpg') %saveas(gcf, 'p1', 'fig') gcf 代表某个 figure 图形 ; 第二个参数是文件名 阅读全文
posted @ 2023-05-14 15:54 Ada_CN 阅读(38) 评论(0) 推荐(0) 编辑
摘要: 第一步:首先需要打开要获取数据的 fig文件; 第二步:新建一个.m文件,输入下面的代码: ha = get(gcf,'Children'); % 获取当前的图形的子对象:Axes坐标轴对象 hl = get(gca,'Children'); % 获取坐标轴的子对象:Line对象 xdata = g 阅读全文
posted @ 2023-05-14 15:51 Ada_CN 阅读(678) 评论(0) 推荐(0) 编辑
摘要: matlab误差带函数绘制效果 函数的input:(x,y,errBar,varargin) %x:自变量x轴数据 %y:数据矩阵y %errBar一般取y数据的均值和标准差,errBar可以是由两个函数句柄组成的cellArray。这个第一个定义了行应该是的统计信息,第二个定义了定义错误栏 调用语 阅读全文
posted @ 2023-05-08 11:58 Ada_CN 阅读(669) 评论(0) 推荐(0) 编辑
摘要: 如果想用对数表示x,则需要添加语句: set(gca,'XScale','log') %% 科学计数法 ax = gca; ax.YAxis.Exponent = 2;%常数2为指数值,改为0即不使用科学计数法 %% 取消科学计数法 get(gca,'xtick') % 得到坐标的实际大小 set( 阅读全文
posted @ 2023-05-04 18:41 Ada_CN 阅读(432) 评论(0) 推荐(0) 编辑
摘要: clc clear close all Sita = 0:0.25:5; y1 = -20000./(1.6.*Sita.^2-288.00); y2 = -20000./(1.2.*Sita.^2-208.00); y3 = -56000./(1.92.*Sita.^2-294.400); y4 阅读全文
posted @ 2023-04-29 10:15 Ada_CN 阅读(64) 评论(0) 推荐(0) 编辑
摘要: set(gca,'ycolor',[0 0 0]);%颜色 %设置不同字体、字型、以及换行显示,换行显示用{}包住每行字即可 yr = ylabel('\it\fontname{Times New Roman}y_{CS}^{M4}... \rm\fontname{Times New Roman}\ 阅读全文
posted @ 2023-04-29 10:12 Ada_CN 阅读(388) 评论(0) 推荐(0) 编辑
摘要: 先将原本的坐标轴轴线关闭 ax=gca; ax.YAxis.Visible = 'off'; ax.XAxis.Visible = 'off'; ax.ZAxis.Visible = 'off'; 然后调用函数 ax.LineWidth=1.2; ax.XAxisLocation='origin'; 阅读全文
posted @ 2023-04-29 10:08 Ada_CN 阅读(196) 评论(0) 推荐(0) 编辑
摘要: clc clear close all %读取数据文件 [num, txt, raw] = xlsread('data.xlsx'); %将第一列读进来作为时间 dateStrings = raw(2:end, 1); %将第一列设置为时间数字格式 x_raw=datenum(dateStrings 阅读全文
posted @ 2023-04-29 09:32 Ada_CN 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 找不到stdafx.h头文件问题 #include "stdafx.h" #include "stdlib.h" char* getcharBuffer() { return "1919,3a3a"; } void changeto4(char * buffer) { while(*buffer) 阅读全文
posted @ 2022-09-29 11:02 Ada_CN 阅读(2314) 评论(0) 推荐(0) 编辑