MATLAB与Python,Mathematica由高维转化一维矩阵的方式的不同点
MATLAB #Python #Dataprocessing在进行数据处理的时候,我比较喜欢的数据存储方式是所有的数据都保存成MATLAB的“.mat”文件,这种格式Python,Mathematica,MATLAB都会支持。不过在转化的时候得注意,特别是涉及到1维矩阵转化为多维矩阵的操作时,MATLAB与Pythonh,Mathematica有本质的不同,MATLAB是按照先“列”后“行”的顺序存数据的,而Mathematica和Python是按照先“行”后“列”的顺序存数据,具体的,我们可以用一个例子来说明:我们定义矩阵A,将A转化为1维矩阵A1D再转化回来为B.
MATLAB首先是MATLAB123A=[[1,2,3];[4,5,6];[7,8,9]];A1D=A(:);B=reshape(A,[3,3]);
123456789101112131415161718192021>> AA = 1 2 3 4 5 6 7 8 9>> A1D'ans = 1 4 7 ...
Direction in port-Plane wave input via port in COMSOL
Direction of input wave via port in COMSOL[TOC]
IntroductionIn COMSOL5.1, when we need input the plane wave from port, we need set the field expressions and the phase factors manually. In COMSOL 5.4, the evaluation angel $\alpha{1}$ and azimuthal angle $\alpha{2}$ are introduced to help us define the input angle. However, the definition of the angle combined with the field is not so easy. I spend a lot of time to learn and test the angle and then finally obtain the proper way to define the plan ...
Plane wave's transmission in a substate structure and its theoretical realization in COMSOL
Plane wave’s transmission in a substate structure and its theoretical realization in COMSOLDate:Create at: 2020 02 20Update at: 2020 08 20
IntroductionIn quantum nano optics, we often encounter this kind of problem:
Simulating the scattering of light by a nano objects on substrate.
The best way to simulate this kind of problem is the background field method since the enhancement of the light can be easily obtained. I use COMSOL to simulate this kind of problem and the simulation would be much fa ...
领域内大佬相关信息总结
这是为了收集自己研究相关的大佬或者相关组的一些信息以及代表作。
我会为这些人创建一个简单介绍以及代表作,代表工作。后续会更新他们的文章的一些介绍以及贡献。
也需要在google学术以及research gate上将他们动态实时掌握出来。
Franco NoriChief Scientist at RIKEN. Also, at the University of Michigan.
Google学术主页
Peter LodahlProfessor of Physics, Niels Bohr Institute, University of Copenhagen
Google学术主页
Niels Bohr Institute
Shanhui FanProfessor of Electrical Engineering, Stanford University
Google学术主页
Florian MarquardtMax Planck Institute for the Science of Light and University of Erlangen-Nuremberg
...
Installation of COMSOL
COMSOLOn UbuntuThe COMSOL installation package is a ISO file and we need mount it first. We create a empty folder first
1sudo mkdir /mnt/temp
Then we mount the ISO file and run the setup file
12sudo mount -o loop ./*.iso /mnt/tempsudo /mnt/temp/setup
During installation, we should
Choose the correct lic file
Cancel the update choice.
Cancel the un-needed modules.
For us the most import step is the installation of the COMSOL Livelink with MATLAB. We should choose the correct folder of the ...
How to use COMSOL on server
COMSOLThis note is to show the way of using COMSOL on our server (ubuntu). We hope that we can run them with bash code in background and after we logout or exit the server the simulations will continue. We also need to know the simulation progress from a log file. These needs can all be satisfied only if you write proper bash code.
Run COMSOL on serverIf you want to run COMSOL on server, you can use the command of the following form
1nohup comsol batch -inputfile <inputfilename> -outputf ...
COMSOL Problem List and Solutions
COMSOL[TOC]
IntroductionTo summarize the problems we often encountered in using COMSOL. I will update it later.
Problem 1 : No accumulated tables
Problem description:
We need define some global variables (such as the total power and radiative power) and when we do parameter sweep in COMSOL, an accumulated table should be generated to store the global variable. However, in a certain case when we have many tables in COMSOL and even if we have chosen the “Accumulated Table” to be ”New”, the table ...
Meep教程(1):在Ubuntu或者Windows的Ubuntu子系统的安装
Meep更新日志(2021 03 18)最近才知道自己以前安装的是非并行版本的Meep,为了不给大家造成困扰,我这里将以前的错误描述更正了。
(2023 04 22)最近发现官网的安装代码又有变化,按照老版本安装会有各种问题,所以我把安装代码也更新一下
(2023 09 23)近期安装发现,jupyter的安装有变化,依然使用以前的代码会导致安装不成功,这次将jupyter-notebook的安装更新完整了之前的安装命令是:1conda install jupyter
但最近安装有变化,根据jupyter最新的安装教程 :
1234567891011# 推荐使用conda forge源conda config --add channels conda-forgeconda config --set channel_priority strict# 如果安装jupyter notebookconda install notebook# 启动jupyter notebook# 如果是安装jupyterlabconda install jupyterlab# 启动jupyter lab
介绍 ...
Dipole's Emission In Multi-Layered Structure
IntroductionThis is the note of dipole radiation pattern calculations in a multilayer structure.
The numerical realizations can be found in my Github.
The derivations mainly follow the work of Olivier J. F et .al ref1
Extra wordsMy previous calculations are not helpful since we can not get the emission pattern. In previous cylindrical expressions, the integral in has been transformed into Bessel functions via
J_{n}(k_{\rho}\rho)=\frac{j^{-n}}{2\pi}\int_{0}^{2\pi}\mathrm{d}k_{\phi}\exp (jk_{\r ...
win10 按百分比显示电量的图标软件
Windows自己的笔记本是惠普的,看见同事的笔记本的电量是一个小的带百分比的图标,自己也想拥有,怎么办呢?
去下载联想的电量管理软件吗?感觉不是很靠谱,结果Google,马上就知道了靠谱的软件,
2 Cool Apps to Show Remaining Battery Percentage on the Windows 10 Taskbar
这里面推荐了两款软件,我觉得第一个BatteryBar 更加符合我的审美和需求。可以点击作者的链接直接下载免费版 .最终下过如下
我要的要求是比以前的默认图标大,而且显示百分比,这个已经做的很好了。