Community Profile

# Sarah Gomez

Last seen: 約1年 前 2022 年からアクティブ

バッジを表示

#### Content Feed

Array isn't being correctly indexed?
T = 10; numpoints = 1000; %1:1000:10, so from 1 to 10 I want 1000 points in between for i = 1:numpoints:T T1(1,i) = i...

### 1

Divide elements of matrix by scalar
for i = 1:N P(i) = P(i)/2; end I have this for loop that's supposed to divide each element of P by two, then I graph...

### 1

Make first and last element of array 0
N = 12*0.5; TAU_max = 15; for i = 1:N TAU(i,:) = i*(TAU_max/N); end I have a little loop here that creates a column ...

### 2

Prevent variables from displaying after fprint
[root, funcroot, esterr, numiter] = bisectionMethod(@(x)x^2-9, [0 30], 0.005, 180) For the given function: @(x)x^2-9 The roo...

### 1

Alternative for linspace?
function [xvals, yvals]=A5fourier(L,nmax,numpoints) %xvals=linspace(-L,L,numpoints); for z=-0.1:0.001:0.1 xvals=z; e...

### 1

Plotting values from a function in different script
function [xvals,yvals]=fourier(L,nmax,numpoints) xvals=[]; yvals=[]; for x=1:numpoints y=0; for n=1:2:nmax ...

### 1

Replace a syms command
clear; clc; syms 'j' y1 = 7 .* (-0.2).*j.*cos(7.*j + 3); y2 = 5 .* exp(-1.1).*j.*tan(3.*j - 1); fplot(y1, [0 30]); ...

### 1

Adding text to plot with random inputs
clc; clear; y=20*randn(1,100000)+80; histogram(y,11) title('Normal Distribution') xlabel('Value'); ylabel('Count'); ...