Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1.
Examp...
Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so:
x = [1 2 3 4]
Commas are optional, s...
6年弱 前
解決済み
Times 2 - START HERE
Try out this test problem first.
Given the variable x as your input, multiply it by two and put the result in y.
Examples:...
回答済み generate multi Diagonal matrices
In your code, you are only calculating the svd of the column 3 and row 3.
N = 100;
for j=1:length(N)
H = 0.5.*(randn(3,3, ...
6年弱 前 | 0
回答済み plot square-wave sine grating
t = 85:1e-2:100;
[X,Y]=meshgrid(t);
% you can use fourier series to see the change in the function
% components = 1 --> si...
6年弱 前 | 0
回答済み Simulate single sine wave
time = linspace(0,5,200); %Sampling signal
signal = sin(2*pi*time); %sine wave
vectorx = [ones(1,length(time)/4) 3*ones(1,le...
6年弱 前 | 0
回答済み Fourier Series on MATLAB
You need know the fuction of each wave form and use a "for" with fourier series.
For example:
components = 1; t = 0:1e-2:10;...
6年弱 前 | 1
回答済み what is the error with that code?
clc
clear all
r=0.05;
l=0.01;
st=0.0001;
v=220;
Kf=18;
j=3;
Tl=60;
i=0;
w=0;
I=[];
W=[];
t=[];
for dt=0:0.0001:1
...