Community Profile

photo

Craig Egan Allistair Tan


Last seen: 1 year ago Active since 2021

Statistics

  • Thankful Level 2

View badges

Content Feed

View by

Question


How do I use the matrix elements, all of which are functions of lambda, to obtain R(lambda)? I get an error when I try to use the matrix elements to get R(lambda).)
If we let M be a 2x2 matrix with matrix elements M1, M2, M3, and M4, all of which are dependent on lambda, I cannot seem to use ...

2 years ago | 1 answer | 0

1

answer

Question


If A and B are 2x2 matrices, how is the input (A*B)^2 interpreted by MATLAB as?
Is (A*B)^2 interpreted as A*B*A*B or (A*B)*(A*B)?

2 years ago | 2 answers | 0

2

answers

Question


If I let A, B, and C be 2x2 matrices, is it possible for me to assign a label to each matrix element in matrix C where C = A*B?
Let A, B, and C be separate 2x2 matrices. In this case, we let matrix C = A*B.

2 years ago | 2 answers | 0

2

answers

Question


What command/s can I use to multiply matrices M_G and M_A via Transfer Matrix Method N times given N pairs?
lambda_0 = 0.980; % Cavity length of DBR mirror in micron d_G = 0.0697...

2 years ago | 0 answers | 0

0

answers

Question


How to I find the intersection point between y=x*exp(x)/(exp(x)-1) and y=3? I can't seem to have the intersection point displayed.
x = 1:1:10; f = @(x) x.*exp(x); g = @(x) exp(x)-1; y_1 = @(x) f(x)./g(x); y_2 = @(x) yline(3,'b'); intersection = find(y_1(...

2 years ago | 1 answer | 0

1

answer

Question


How do I plot fractional orders of the Bessel function of the first kind (e.g. J_{1/3}(x))? Can I still use the besselj function?
clc;clear all;clf; x=-20:0.1:20; J1/3=besselj(1/3,x); figure(1) plot(x,J1/3,'k'); grid on legend('J_{1/3}') xlabel('x');y...

2 years ago | 0 answers | 0

0

answers

Question


Hello, I'm trying to plot one non-piecewise function and two piecewise functions in one graph but I keep getting an error. I don't understand the two error messages below.
clear all; close all; clc; function y = piecewise1(x) switch x case x * (x < 0 & x <= 1) y = 1*x-(1/2)*x^2; ...

2 years ago | 1 answer | 0

1

answer

Question


Hello, I'm trying to plot the I-V curve for a MOSFET, but I get a "Vectors must be the same length" error message. I don't understand why this is the case.
clear all; close all; clc; x1 = 0:0.01:0; y1 = (0).*x1-(1/2).*x1.^2; x2 = 0:0.01:6; y2 = (1/2).*0^2; x3 = 0:0.01:1; ...

2 years ago | 1 answer | 0

1

answer

Question


Hello, I am trying to plot the transmission coefficient vs energy for the double barrier potential, but I get an error. May I know what I have done wrong here?
V_0 = 0.2800; % Barrier strength in eV hbar = 1.054571596e-34; % Reduced Planck constant m = 5.465629128e-32; % 0.06*m_e L = ...

2 years ago | 1 answer | 0

1

answer