Answered
Lower whisker and outliers not showing up on boxplot
You’re using a logarithmic y-axis scale. If the whiskers are negative, they won’t plot. They should appear with the default se...

7 years ago | 0

Answered
I have trouble with connect a usb webcam
Does the webcam work in other contexts? If not, what version of MATLAB are you using, and how did you download the webcam Har...

7 years ago | 0

Answered
hi every one, i need help to make something in matlab that i don't if it can be done or not , thank you
Try this: It uses: X = X(~all(X == 0,2),:) % Deletes Zero Rows to delete the rows that are all 0. ...

7 years ago | 0

| accepted

Answered
Understanding the coding in Matlab
This line: t=mean(gbd(:)); converts ‘gbd’ (that is likely a matrix) into a column vector, and then takes the mean of the vect...

7 years ago | 0

| accepted

Answered
Finding intersection of curve and a line
Your ‘curve’ has noise between x=0 and x=200 or so. You will likely need to exclude that region. One option is to use interp...

7 years ago | 0

Answered
GA duplicate data points in the same solution of the population of matlab
The result depends on your fitness function, and any constraints you have. Since you did not post your fitness function or your...

7 years ago | 1

Answered
cant find the mistake here
Try this: function v = twins(a,b) v = []; for i =1:a for j =1:b if isprime (i) && isprime(j) && abs(i-j)==2 ...

7 years ago | 0

Answered
"Undefined function 'int' for input arguments of type 'double'." error shows in my simulation, how to address this problem?
You have assigned numeric variables to ‘x’, and to ‘D’, so ‘f’ is not a function of any variable. Perhaps you want: atbt = ...

7 years ago | 0

Answered
A file called avehighs.dat stores the average high temperatures for each month for a year (rounded to integers). The first column of the data stores the zip code, the 2nd to 13th columns store 12 temperatures.
If you are not getting any output from your function, it is most likely because you did not assign anything to your ‘output’ var...

7 years ago | 0

| accepted

Answered
Plotting two files of different lengths. Would like to graph values from each data set corresponding to their time data.
Try this: fn1 = '5.00_20190628_Voltage_Output_LASERandPMT_benchPMT_left.txt'; fn2 = '5.00_20190628_Voltage_Output_LASERandPMT...

7 years ago | 0

| accepted

Answered
Calculate area between unknown curve and straight line
The areas below the line are negative: AboveLine = T>=T_avg; % Logical Vector AreaA...

7 years ago | 1

| accepted

Answered
do the psd using different methods (maybe there is a problem in the normalization9
I cannot run your code, since I do not have ‘xdft’, and I cannot figure out from your code what it should be. However, that may...

7 years ago | 0

| accepted

Answered
plot 2D graph
Try this: syms t U(t) V(t) Y Eqs = [diff(V,t) == V-V.^3/3-U+2; diff(U,t) == 1.25*(V-U+0.9)]; [VF,Sbs] = odeToVectorField(E...

7 years ago | 0

Answered
How to make a plot smooth?
It depends on what you intend by ’smooth’. Try this: I = openfig('scma25.fig'); Ax = gca; Lines = findobj(Ax,'Type','line...

7 years ago | 0

| accepted

Answered
Hi! Need to import a dataset of 1.57 GB.
It depends what it is, what you want to do with it, and your computer memory size. If you have R2019a, use the readmatrix (li...

7 years ago | 0

Answered
How to subtracts elements in a list
To get a vector output: A = randi(9, 1, 4) % Create Vector Dif = A(:) - A(:)'; ...

7 years ago | 0

| accepted

Answered
How do I plot three variables against each other?
Try this: lat = rand(10,1); % Create Vector lon = rand(10,1); ...

7 years ago | 0

| accepted

Answered
Flipping the x labels in a plot
Try this: x = linspace(0, 1000, 20); y = exp(0.01*x); figure plot(x, y) grid title('Original') figure plot(x, y) g...

7 years ago | 1

| accepted

Answered
How to separate cells?
This looks familiar! ‘I want to manipulate columns 8 and 9 of the individual matrices ...’ To do that for ‘D{1}’: D1_Col...

7 years ago | 0

Answered
Plot 2D constraints
You do not need the loop. Try this: x = linspace(-5, 5, 20); L = 20; y = (d-x*(a-b))/(c-b); plot(x,y)

7 years ago | 1

Answered
Calculating sampling frequency of a 5 min time stamp of GHI measurements
If the sampling interval is 5 minutes (minutes per sample), the sampling frequency is the inverse of that, or 1/5=0.2 samples/mi...

7 years ago | 0

| accepted

Answered
Defining the limits of an integral
You forgot to use element-wise operations in the division in ‘f’: f = @(x)(1/sqrt(2*pi)).*exp((-1./(x.^2))); ...

7 years ago | 0

| accepted

Answered
read .txt file data with data between specific lines "string" .
The textscan function using a numeric format descriptor string will automatically stop when it encounters: *Element, type=C3D4...

7 years ago | 0

| accepted

Answered
Bode Plot data extraction to xlsx file format
It is essentially impossible to get any useful results from bodeplot. It is intended to provide plot options. Use the bode f...

7 years ago | 0

| accepted

Answered
why am i getting Undefined function 'HumanWalkingModel' for input arguments of type 'char'. ?
You have to copy the code to that function and all the other functions, paste each one to a different .m file with the same name...

7 years ago | 0

| accepted

Answered
How do I perform a frequency sweep on a .WAV file?
‘Is there an alternative function or approach that newer versions of MatLab supports?’ Yes. See the documentation on the audio...

7 years ago | 0

Answered
Error using nlinfit for logarithmic model
Of course it will return Inf or NaN values! Note that: x=[0; 1; 11; 13; 19; 25; 31; 38; 55; 61; 74; 92; 109]; and log(0...

7 years ago | 1

Answered
How to plot a 3d graph with z axis, not the same length as x,y
Interpolation is a favourite way to ‘stretch’ vectors. If it conforms with your other requirements, try this: zdataNew = in...

7 years ago | 0

Answered
How to extract the first character in a string when the string is eg. PReschooler?
If font/letter case is an issue, it might be better to use the strcmpi (link) function, to ignore the font/letter case altogethe...

7 years ago | 0

Answered
2018b Update 3
Try it! Note that there are four updates available for R2018b: MATLAB R2018b Updates Release Notes

7 years ago | 0

Load more