Resuelto


MATLAB Basic: rounding II
Do rounding nearest integer. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 9

alrededor de 4 años hace

Resuelto


MATLAB Basic: rounding
Do rounding near to zero Example: -8.8, answer -8 +8.1 answer 8

alrededor de 4 años hace

Respondida
how to make an anonymous function with more than 1 statement or equation?
B=2; C=4; f=@(x) B*x +C*x^2; % d=@(x) C*x^2 sqrt(f(2))

alrededor de 4 años hace | 0

Resuelto


Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

alrededor de 4 años hace

Resuelto


Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

alrededor de 4 años hace

Respondida
Stacked bar graph with repeating datetime
A=readtable('Project1.xlsx', 'PreserveVariableNames', 0); AA=table2array(A); B = regexp(table2array(A), '\s+', 'split'); % sp...

alrededor de 4 años hace | 1

Resuelto


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

alrededor de 4 años hace

Respondida
Why is my plot shaking but not plotting the noise?
x = 0:pi/200:(2*pi);% does't need e = rand; % does't need y = x.*sin(x)+(0.5*e); % does't need x_star = 0:(pi/200):(2*pi); ...

alrededor de 4 años hace | 0

| aceptada

Respondida
An integer multiple a function
I dont know the value of n. I took it 200. A=load('ecg_hw2.mat'); ecg=A.ecg ; N = [2 4 8 16 32]; b = 1./N; ye = cell(size(b...

alrededor de 4 años hace | 0

Respondida
how do i plot the output with constant input
Vonew=45; vin=30; y=Vonew; %i get my Voutnew=45 plot( vin,y, 'o', 'LineWidth', 2); xlabel('vin', 'FontSize', 20); ylabel('v...

alrededor de 4 años hace | 0

Resuelto


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

alrededor de 4 años hace

Resuelto


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

alrededor de 4 años hace

Resuelto


Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

alrededor de 4 años hace

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

alrededor de 4 años hace

Respondida
Adding date to timetable with just time
follow this https://www.mathworks.com/matlabcentral/answers/288524-how-do-you-separate-the-contents-of-one-cell-into-separate-c...

alrededor de 4 años hace | 0

Respondida
How to add a first row and a first column of zeros in a matrix?
A=[1 2 3; 4 5 6; 7 8 9]; AA=[zeros(1,3);A]; AAA=zeros(4,1); B=[AAA AA]; B(:,end)=[]; B(end,:)=[]

alrededor de 4 años hace | 1

| aceptada

Respondida
How to extract monthly data in a matrix
As you did not attach any data, i took the random data A=readtable('Data.xlsx'); Data=table2array(A(:,2)); Year=(1971:2000)';...

alrededor de 4 años hace | 0

| aceptada

Respondida
Subtracting elements within a table
A=[1 23 2 24 3 21 4 34 1 89 2 23.2 3 34.8 4 -23.1]; My_Table= table(A(:,...

alrededor de 4 años hace | 0

| aceptada

Respondida
non zero elements in an array
a=[1 2 4 5 3 0 0 8 0]; [idx]=find(a<2); a(idx)=0; out=a; [idx2]=find(out>=2); out(idx2)=1

alrededor de 4 años hace | 0

| aceptada

Respondida
Getting a compound matrix to work
n=[1,3,16]; P=800; t=20; format shortG y=P.*(1+t/100).^n-P; % Compound Interest,C.I.= P × (1+t)n - P Year_1=y(1); Year_3=...

alrededor de 4 años hace | 0

| aceptada

Respondida
Compare two vector arrays and if they match set vector array 2 = nan?
Try this... time = [0,0,0,0,2,3,4,5,5,6,7,8]; solution = [1,2,0,0,1,1,2,2,2,0,0,0]; [idx]=find(time==solution); solution(id...

alrededor de 4 años hace | 0

Respondida
Difference between two time values in minutes
t1 = {'08/24/2010 13:21:47.030'}; t2 = {'08/24/2010 14:13:09.118'}; dt= diff(datenum([t1;t2]))*24*60 % to get the second sec...

alrededor de 4 años hace | 1

Respondida
Adding text to plot with random inputs
y=20*randn(1,100000)+80; histogram(y,11) title('Normal Distribution') xlabel('Value'); ylabel('Count'); txt1={'\mu = 80'}; ...

alrededor de 4 años hace | 0

Respondida
how to add timestep iteration and show all iteration in plot
time = [4 50] ; points = [20 100] ; % interpolation step_count = time(1):0.1:time(2) ; % timestep 0.1 expected_points = inte...

alrededor de 4 años hace | 0

Respondida
Loop through array containing coordinates points
Try this... p0 = [1, 1]; p1 = [2, 3]; p2 = [4, 3]; p3 = [3, 1]; cords = [p0, p1, p2, p3]; N=length(cords); for i = 1:leng...

alrededor de 4 años hace | 0

| aceptada

Respondida
how to make "two matrixes → one matrix repeated colum"
please have a look here https://www.mathworks.com/matlabcentral/answers/266969-combine-two-matrices-every-other-column

alrededor de 4 años hace | 0

| aceptada

Resuelto


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; ...

alrededor de 4 años hace

Resuelto


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

alrededor de 4 años hace

Respondida
Matlab filter columns of array based on value in row
use 'find' function to look up the value which is equal to 3 in 'z' x=randi(100,3,3000); y=randi(80,3,3000); z=randi(50,3,30...

alrededor de 4 años hace | 0

| aceptada

Respondida
color in output in matlab
It might be helpful https://www.mathworks.com/matlabcentral/answers/15328-adding-color-in-command-window-output a=[1 2 3 4 4];...

alrededor de 4 años hace | 0

| aceptada

Cargar más