Answered
How to plat three similar figures together for comparison?
Without your data it is not possible to determine what the problem may be. However, you are telling *|plot|* to use a _blue...

8 years ago | 0

Answered
Genetic Algorithm Drifting to Worse Solutions With Each Generation
Assuming that you wrote your fitness function correctly, you are optimising *|692|* parameters, and you have only let it run for...

8 years ago | 0

Answered
minreal gives me wrong solutions with Matlab >2014. How to set the tolerance?
The problem is your *|inv|* call. Use <https://www.mathworks.com/help/matlab/ref/mldivide.html *|mldivide,\|*> (link) instead, ...

8 years ago | 0

| accepted

Answered
how do i store the all 100 xmax values for the code
Since *|‘w’|* is defined as having only positive integer values, you can use it as an index. Try this: t=0:0.001:10; ...

8 years ago | 0

Answered
solve function for log?
You need to calculate a numeric solution to your equation. One way to understand what it is doing is to find and plot the *|con...

8 years ago | 0

Answered
Text scan huge text file
Yes. The format string would be: '%f%f%f%f%f%f%f' and you need to specify *|'HeaderLines',3|* (or however many hea...

8 years ago | 0

Answered
How to properly write e^(sin(x)^3) x^6-2x^4-x^
You need to use <https://www.mathworks.com/help/matlab/matlab_prog/vectorization.html *Vectorization*> (link): f= @(x)(exp...

8 years ago | 0

Answered
Error in code line can't solve
You forgot to vectorise the last square: sigma_3b=(u*(lambda_3b.^1)).*((lambda_3b.^1)-1)+(2*k1)*((lambda_3b.^2)-1).*(exp(k...

8 years ago | 0

| accepted

Answered
Creating Multiple Line plots
Similar to the 3D line plot, but easier: A = [0 10 15 0 15 0.5 10 10 0 20 0.6 6 24 0 11 ...

8 years ago | 0

Answered
can anyone help me please ?
*_First_*, remove the parentheses around the *|‘D’|* assignments in the *|if|* block, *_Second_*, your *|if|* block *|elsei...

8 years ago | 0

Answered
Locating number from file name
Try this: str = 'Shot 12 Spectra data.mat'; Nr = sscanf(str, '%*s%d') Nr = 12 *_EDIT_ —* If the fi...

8 years ago | 0

| accepted

Answered
Creating multiple Line plot
Try this: A = [1 0 10 15 0 15 2 0.5 10 10 0 20 3 0.6 6 24 0 11 4 0.8 0 29 0 11...

8 years ago | 0

| accepted

Answered
How do I use scatter plot
Add this, _after_ the code you posted: for k1 = 1:length(v2sol) zsol04(k1) = interp1(v2sol{k1}, zsol{k1}, 0.4) e...

8 years ago | 0

| accepted

Answered
how to load dates from xlsx files into matlab
Without your data to work with, we cannot troubleshoot the problem. Your best option is likely the <https://www.mathworks.c...

8 years ago | 0

| accepted

Answered
Find value from column / row number
In MATLAB, array indexing uses integers greater than zero, so indices corresponding to your vector elements *|11|* and *|5|* wou...

8 years ago | 0

Answered
how do I plot the values on a circular axis instead of a horizontal axis??? like a bicycles wheel spokes
I am not certain what you want to do. # Create polar axes using the <https://www.mathworks.com/help/matlab/ref/polaraxes.ht...

8 years ago | 0

Answered
speech_dft_8kHz.wav
Start with the <https://www.mathworks.com/help/matlab/ref/audioread.html *|audioread|*> (link), then <https://www.mathworks.com/...

8 years ago | 0

| accepted

Answered
'The grid vectors must contain unique points.' error with Interp1
One approach: x = table(:,2); x = x + (0:size(D,1)-1)'*1E-14; The rest of your code is unchanged.

8 years ago | 0

| accepted

Answered
How to make a 3D scatterplot with perspective
See the documentation on the <https://www.mathworks.com/help/matlab/ref/matlab.graphics.axis.axes-properties.html *Axes Properti...

8 years ago | 5

Answered
Filter Selection for Noisy Signal
If you have the Signal Processing Toolbox, use the <https://www.mathworks.com/help/signal/ref/filtfilt.html *|filtfilt|*> (link)...

8 years ago | 0

| accepted

Answered
How can I find all the maximums and minimums in Pulse Wave?
The *|findpeaks|* function has a number of options to prevent it from detecting peaks that are close to each other (the *|'MinPe...

8 years ago | 1

Answered
My function is only giving me one output
If you call it as: Y = BeamReactions(BeamLength,BeamMass,Load,LoadX,LoadAngle) it will only return the first output. ...

8 years ago | 0

| accepted

Answered
Having trouble using a function
You need to define it with input arguments in order to use it with them. Unlike <http://www.mathworks.com/help/matlab/matlab_pr...

8 years ago | 0

Answered
How to determine the parameters of statistical distributions
Use the Statistics and Machine Learning Toolbox <https://www.mathworks.com/help/stats/fitdist.html *|fitdist|*> (link) function....

8 years ago | 0

| accepted

Answered
second derivate of an histogram
I am not sure what you want. You can use the <https://www.mathworks.com/help/matlab/ref/gradient.html *|gradient|*> (link) ...

8 years ago | 0

Answered
How to use lsqnonlin to fit model to data?
If you are fitting *_matrix_* _independent_ and _dependent_ variables to a function, use the <https://www.mathworks.com/help/opt...

8 years ago | 0

| accepted

Answered
Define bar3() colors with hold on
It is necessary to reverse the order: %%%%%%%%%% Bin1 data1 = data(Bin6_BeginRow:Bin6_EndRow, :); data2 = zer...

8 years ago | 1

| accepted

Answered
Replacing min and max values
Use ‘logical indexing’: M=[5 0 2;8 3 1;1 8 0]; Mn = M == min(M) Mx = M == max(M) See the documentation on <https:...

8 years ago | 0

Answered
Struct contents reference from a non-struct array object. Error
Your file has *|18|* header lines, and every other row of the original *|‘data’|* matrix are *|NaN(1:4)|*. Try this: ...

8 years ago | 0

Load more