Answered Plotting a piecewise curve
% Vectorization is much more efficient and thus, it is better to use it here:
n=100; tau =0.2; t = (n-1)*tau:tau/n:n*tau;
Use...
5 years ago | 0
Answered While loop to get correct user input
Use this string comparison command instead of simple comparison in your IF condition: strncmpi(material, 'uran', 4) || strncmp...
5 years ago | 0
Answered Matlab Vectors for optimization
Easy solution would be to employ: randi([2, 13], Ntimes) to generate A, B, C; Sum them up: A+B+C; Compare the summation value a...
Answered How to add values at blue dots in graphs?
You mean sum up the plotted blue 'square' marker data points?
If so and you have only this plot as a data source, then you can ...
Answered Change the frequency of an array
According to you exercise statement, this one works ok.
f = input('Enter time frequency value: ');
t0=0; dt = 1/f; tend = 30...