Question

Looping a function in MATHLAB

Please, how can I loop this function function y = f(x) y = sqrt(1 - (x^2)*(Z^2)); end to solve for different values if Z (...

6 months ago | 1 answer | 0

Question

Freezing a frame and extracting values

I have a video of a wave propagating at incresing time with depth How can i write a code to freeze the video at various frame...

6 months ago | 1 answer | 0

Question

How to colour plot grey

How can i make each of the three plots grey in colour. Thanks figure(1) plot(Dmq1) hold on plot(Dmq) hold on plot(Dm...

9 months ago | 1 answer | 0

Question

Generating random number, mathlab

Plese how can I generate a single uniformly distributed random number between 0 and 1 ie U(0,1)

9 months ago | 1 answer | 0

Question

help regarding conditional if statement

How do i write the code for the if statement such that if the condition fails it maintains the previous model (m) theta = [0:90...

9 months ago | 1 answer | 0

Question

Plotting normalised histogram of parameters

How can I plot the normalized histograms for parameter x, which correspond to marginal probability distributions n = 20000;...

10 months ago | 1 answer | 0

Question

Storing values in a loop

plot of x does not give a normal distribution as expected, seems to be an error in my code n = 20000; x = zeros(n,1) x(1...

10 months ago | 1 answer | 0

Question

challenge implementing for loop

I have chanllenges implementing this code to run a loop from Tmax to Tmin and accepting or rejecting m based on if statement ...

10 months ago | 0 answers | 0

Question

Writing expression for summation on mathlab

how can i write this on mathlab

10 months ago | 1 answer | 0

Question

How can I Multiply a vector by a weight matrix

How can i multiple a 20 by 50 matrix (A) by a 20 by 20 weigting matrix(S) i.e SA THANK you

10 months ago | 0 answers | 0

Question

setting column of a matrix to zero

A(j,k) = exp((-a * j^2 * z)/mt(k)) A is a 20 by 50 matrix how can i set column 25 - 30 of A to zero thank you

11 months ago | 2 answers | 0

Question

plotting when variables are conditional

t = logspace(-3,13,100) for j = 1:100 q = inv((At * Cdi * A) + (t(j) * Ht * H)) * At * Cdi * do c1(j) = transpose((A * q) ...

11 months ago | 1 answer | 0

Question

Storing values in a loop

t = linspace(10^-4,10^12,17) q = zeros(length(t),1); for i = 1:17 m(i) = inv((At * Cd * A) + (t(i) * Ht * H)) * At * Cd *...

11 months ago | 0 answers | 0

Question

Unable to store matrix array in for loop

t = linspace(10^-4,10^12,17) for i = 1:17 m = inv((At * Cd * A) + (t(i) * Ht * H)) * At * Cd * do end Solution for m ...

11 months ago | 1 answer | 0