解決済み


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...

5年以上 前

解決済み


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

5年以上 前

回答済み
create a loop to determine the pixel distance from the center using the distance formula
you just have to move (x, y). (x_c, y_x) are fixed. image = imread('sunflower,jpg'); [l,h,~] = size(image); %(x_c,y_c) = c...

5年以上 前 | 0

| 採用済み

回答済み
How to create an array and combine and put two images into it
Maybe you need to resize or add white pixels so that the images have the same dimension. A = imread('Yuan.jpg'); ACrop = A(300...

5年以上 前 | 0

| 採用済み

回答済み
creating a function that plots sinewaves for different parameters.
%signal = autoWave(frecuency(Hz),amplitude) signal = autoWave(5,2); Function: function [signal]=autoWave(frecuency,amplitude)...

5年以上 前 | 0

回答済み
Creating a chart of T v. P. How do I use the solve function to solve every part of an array?
you need use solve() element to element. n = 2; D = 8.35; start = 10; finish =200; sy = 64; T = linspace(start, finish, 200); ...

5年以上 前 | 0

| 採用済み

解決済み


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...

5年以上 前

解決済み


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:...

5年以上 前

回答済み
Real and Imaginary element Separation from square matrix and stacking into a vector
with a matrix of example "a": a = [1 1+3*i 2+3*i; 3+4*i 2 4+4*i; 5+4*i 6+4*i 3]; realMatrix = zeros(1,length(a)); realMatrixx...

5年以上 前 | 1

回答済み
How can I make image with specific color in each column???
You can use this code to generate the color rows: clear all; figure for bits = 1:1:8 Color=2^bits; %Number of colors lev...

5年以上 前 | 1

| 採用済み

回答済み
Problems plotting and adding legend to certain point in a plot
to place the dots with different colors: compleja = 0; A = rand(100); result = eig(A) j = 1; for i = 1:length(result)-1 ...

5年以上 前 | 0

回答済み
Plotting a signal sin(2*pi*f*t) and obtaining a discrete periodic signal.
You can use plot to graph continuous signal, and stem to graph discrete signal. For example: t = 0:6e-2:1; signal = sin(2*pi...

5年以上 前 | 1

| 採用済み

回答済み
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, ...

5年以上 前 | 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...

5年以上 前 | 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...

5年以上 前 | 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;...

5年以上 前 | 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 ...

5年以上 前 | 0

| 採用済み

回答済み
Making A table and a plot from a for loop
wt=2400+2000; q =25; u =12000; g =32.2; largo = 100; a = zeros(1,largo); v = zeros(1,largo); h = zeros(1,largo...

5年以上 前 | 0

| 採用済み