随笔分类 -  Matlab

摘要:%%% current_time_string dateString = replace(datestr(now,31),{' ',':'},'_') 阅读全文
posted @ 2021-09-06 20:22 xdd1997 阅读(176) 评论(0) 推荐(0) 编辑
摘要:Matlab 调试工具 dbstop 的使用_Man-CSDN博客 % 遇到错误时,终止M文件运行,并停在错误行(不包括try...catch语句中检测到的的错误,不能在错误后重新开始运行) dbstop if error % 遇到任何类型错误均停止(包括try...catch语句中检测到的的错误) 阅读全文
posted @ 2021-08-23 20:52 xdd1997 阅读(285) 评论(0) 推荐(0) 编辑
摘要:clc;clear ii=1 p1 = [1 2;3 4] str = ['p',num2str(ii)] str2 = eval(str) aaa = str2 + 5 whos 阅读全文
posted @ 2021-08-14 15:33 xdd1997 阅读(2963) 评论(0) 推荐(0) 编辑
摘要:function ToHypermesh_FEM(p,t,filename) % Elements must be all tetrahedral or all hexahedral [row,col]=size(p); if row~=3 && col==3 p = p'; end [~,col] 阅读全文
posted @ 2021-06-01 15:23 xdd1997 阅读(286) 评论(0) 推荐(1) 编辑
摘要:在Matlab脚本文件里面写函数有下面两种格式,注意,一个end都不能少 阅读全文
posted @ 2021-05-27 22:10 xdd1997 阅读(841) 评论(0) 推荐(0) 编辑
摘要:(50条消息) matlab——之class类(详细总结)_qinze5857的博客-CSDN博客 https://blog.csdn.net/qinze5857/article/details/80545885 Matlab中的类定义-提速方法 classdef_beechina的专栏-CSDN博 阅读全文
posted @ 2021-05-06 20:15 xdd1997 阅读(69) 评论(0) 推荐(0) 编辑
摘要:转自:Matlab调用ANSYS的三种方法_xifegnlie的博客-CSDN博客_matlab调用ansys https://blog.csdn.net/xifegnlie/article/details/104130185 1. 源链接方法中未指明工作路径,在此处加上了工作路径 %% matla 阅读全文
posted @ 2021-04-27 15:28 xdd1997 阅读(826) 评论(0) 推荐(0) 编辑
摘要:一、检查文件 查看是否数据异常,txt文件要求纯数字,并且列要能分开 二、查看路径是否有误 1.复制路径 2.win+R,输入cmd 3.粘贴路径 路径异常时如下: 阅读全文
posted @ 2021-04-25 19:32 xdd1997 阅读(3391) 评论(0) 推荐(0) 编辑
摘要:四结点的平面单元 function plot_plane_4_nodes(p,t,U) %%% 传入的t需要是Nelem*m的,Nelem的是单元总数,m是一个单元含有的结点数目 %%% 传入的p是Nnode*3的,Nnode的是结点总数,3列坐标分别为Xcoord,Ycoord,Zcoord %% 阅读全文
posted @ 2021-04-24 10:07 xdd1997 阅读(640) 评论(0) 推荐(0) 编辑
摘要:Cholesky 分解 - MATLAB chol - MathWorks 中国 L为上三角 L为下三角 Matlab验证 A = gallery('wathen',10,10); B = rand(size(A,1),size(A,2)); X_true = A\B; [L,flag,p] = c 阅读全文
posted @ 2021-04-08 19:24 xdd1997 阅读(173) 评论(0) 推荐(0) 编辑
摘要:1.选择乱码文件 右键 在资源管理器中打开 2.用记事本打开乱码文件,在记事本中可以看到没有乱码 3.复制用未乱码的内容 粘贴到Matlab编辑器中 阅读全文
posted @ 2021-03-31 21:58 xdd1997 阅读(569) 评论(0) 推荐(0) 编辑
摘要:Matlab plot画图坐标字体、字号、范围等设置-百度经验https://jingyan.baidu.com/article/ae97a646013e05bbfd461d0b.html figure() x=0:0.2:8; plot(x,sin(x),'-k', 'LineWidth',2); 阅读全文
posted @ 2021-03-12 19:52 xdd1997 阅读(802) 评论(0) 推荐(0) 编辑
摘要:一、矩阵为稀疏矩阵 % % % case1:ss为稀疏矩阵 [i,j,val] = find(ss) data_sparse = sparse(i,j,val); data_out = [i,j,val]; save -ascii data.txt data_out 二、矩阵为满存储的矩阵 % % 阅读全文
posted @ 2021-01-13 20:50 xdd1997 阅读(1616) 评论(0) 推荐(0) 编辑
摘要:《基于MATLAB的GPU编程》 阅读全文
posted @ 2021-01-12 14:16 xdd1997 阅读(283) 评论(0) 推荐(0) 编辑
摘要:一、打开并行环境方法 matlab常用的一些程序和功能 - 悟江居士 - 博客园https://www.cnblogs.com/sonicmlj/p/8560934.html poolobj = gcp('nocreate');% 如果没有打开,新建一个池,内容为空 CoreNum=6; %%% 设 阅读全文
posted @ 2021-01-05 21:33 xdd1997 阅读(389) 评论(0) 推荐(0) 编辑
摘要:已知方阵A与置换向量P 方法一: 对A进行行置换ans=A(p,:) 对A进行列置换ans=A(:,p) 对A进行元素置换ans=A(p,p) 方法二: 列置换: A = gallery('wathen',1,1); P = [1 3 5 7 2 4 6 8]; % % % 列置换 Index1= 阅读全文
posted @ 2021-01-03 21:15 xdd1997 阅读(1786) 评论(0) 推荐(0) 编辑
摘要:对线性方程组 Ax = B 求解 x - MATLAB mldivide \ - MathWorks 中国https://ww2.mathworks.cn/help/matlab/ref/mldivide.html Matlab中的一些小技巧 - 菜鸡一枚 - 博客园https://www.cnbl 阅读全文
posted @ 2021-01-02 16:50 xdd1997 阅读(1429) 评论(0) 推荐(0) 编辑
摘要:知识点 1.存储所占内存是一样大的 2.变量大于2G时可采用save -v7.3的方法 clc clear N = 1e4; s{1}.value = eye(N,N*2) s{1}.days = eye(N,N) s{2}.value = eye(N,N*2) s{2}.days = eye(N, 阅读全文
posted @ 2021-01-02 10:39 xdd1997 阅读(298) 评论(0) 推荐(0) 编辑
摘要:求解线性方程组 - 预条件共轭梯度法 - MATLAB pcg - MathWorks 中国https://ww2.mathworks.cn/help/matlab/ref/pcg.html PCG on a large sparse matrix from Finite difference me 阅读全文
posted @ 2020-12-19 15:36 xdd1997 阅读(922) 评论(0) 推荐(0) 编辑

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