A résolu


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

plus de 4 ans il y a

A résolu


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

plus de 4 ans il y a

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté

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

plus de 4 ans il y a | 0

Réponse apportée
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); ...

plus de 4 ans il y a | 0

| A accepté

A résolu


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

plus de 4 ans il y a

A résolu


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

plus de 4 ans il y a

Réponse apportée
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...

plus de 4 ans il y a | 1

Réponse apportée
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...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
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 ...

plus de 4 ans il y a | 0

Réponse apportée
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...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
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, ...

plus de 4 ans il y a | 0

Réponse apportée
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...

plus de 4 ans il y a | 0

Réponse apportée
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...

plus de 4 ans il y a | 0

Réponse apportée
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;...

plus de 4 ans il y a | 1

Réponse apportée
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 ...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 4 ans il y a | 0

| A accepté