Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

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

más de 5 años hace | 0

| aceptada

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

más de 5 años hace | 0

| aceptada

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

más de 5 años hace | 0

Respondida
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); ...

más de 5 años hace | 0

| aceptada

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

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

más de 5 años hace | 1

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

más de 5 años hace | 1

| aceptada

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

más de 5 años hace | 0

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

más de 5 años hace | 1

| aceptada

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

más de 5 años hace | 0

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

más de 5 años hace | 0

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

más de 5 años hace | 0

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

más de 5 años hace | 1

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

más de 5 años hace | 0

| aceptada

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

más de 5 años hace | 0

| aceptada