Answered
how to write code for 2D image using code for one dimensional plot given below?
I am still not certain what you want. See if this works: a = 0.1; T = 20; s = @(x) (2*a*x/T) .* (0<=x & x<=...

9 years ago | 1

| accepted

Answered
Subscript indices must either be real positive integers or logicals.
Subscripts must be integers greater than zero in MATLAB. I would do something like this: for i=1:length(f1T) ...

9 years ago | 0

| accepted

Answered
Cannot I import data from a file with multiples delimiters?
The <https://www.mathworks.com/help/matlab/ref/textscan.html *|textscan|*> (link) function allows you to specify multiple delime...

9 years ago | 1

Answered
how to write equation given below to find corresponding plot?
Try this: a = 0.1; T = 20; s = @(x) (2*a*x/T) .* (0<=x & x<=T/2) + (2*a*(1-x/T)) .* (T/2<=x & x<=T); x = ...

9 years ago | 0

| accepted

Answered
Make the x axis of a line plot vertical
It would help to have some of your data and an example of the result you want. Without those, it is difficult to provide an exa...

9 years ago | 2

| accepted

Answered
Group data into bins with irregular sizes / Track peaks
Since you have a fixed number of peaks in your data (I assume they are always in the same order), I would store the peaks and ot...

9 years ago | 1

Answered
Sort row by descending error
Try this: A = {'Q7' [ 0] 'Q12H' [-3] 'Q12G' [ 0]}; amaxfc=sortrows(A,2,'descend') am...

9 years ago | 1

Answered
Take an ifft of a particular frequency ( 1 or more ) ?
After you identify your frequencies-of-interest from the *|fft|*, _instead_ of ‘editing’ the *|fft|* output and taking the *|iff...

9 years ago | 0

Answered
How Can I convert a 1 by 1 array into multidimensional array?
One approach: a = [1]; a = a*ones(1, 36); a = reshape(a, [], 4);

9 years ago | 0

Answered
Invalid wavelet name for continous wavelet transform
There are now *_two_* versions of *|cwt|*, an old version and this version of <https://www.mathworks.com/help/wavelet/ref/cwt.ht...

9 years ago | 0

Answered
How to convert array data into column vector?
*_‘I have a set of data in column form (size: 300x1) (class:double), is that mean my data is in array form?’_* *Yes.* It i...

9 years ago | 1

| accepted

Answered
How can I create a plot with column headings along the X-axis?
Try this: M = randi(9, 3); % Create Matrix x = 1:size(M,2); ...

9 years ago | 0

| accepted

Answered
How to find parameters to fit data with multiple peaks
The documentation for the <https://www.mathworks.com/help/signal/ref/findpeaks.html *|findpeaks|*> (link) function actually has ...

9 years ago | 1

Answered
Symbolic Substitution of a Derivative at a Point
This is a persistent problem with *|laplace|*. (I have put in an enhancement request to include initial conditions for *|laplac...

9 years ago | 1

Answered
Error Matrix dimensions must agree
First, you need an operator here, I assume multiplication: Pslip=pi*rou*Le*df*(1-S/Le)*exp(f.*phi); ...

9 years ago | 1

| accepted

Answered
How to get is a phasor with magnitude and phase of sine signal, using mfile?
If your signal *|‘s’|* is complex, phase = angle(s); magnitude = abs(s);

9 years ago | 0

Answered
I wrote a simple program but the any is not in the same format as I need it to be. Please help with this conversion setting: I want to understand how to reset this and change the settings when necessary.
See the documentation on the <https://www.mathworks.com/help/matlab/ref/format.html *|format|*> (link) function. Specifically, ...

9 years ago | 0

Answered
FFT using CSV data file
I could not get *|csvread|* to read the file correctly, because each number in the second column has *|‘;;;;’|* following it in ...

9 years ago | 1

Answered
What are the vectors in fitdist command window output?
Your interpretation is correct. It is necessary to go ‘diving’ into the related documentation that (through <https://www.mathwo...

9 years ago | 1

| accepted

Answered
Contributors metainfo: reputation and more
Congratulations to <https://www.mathworks.com/matlabcentral/profile/authors/2950957-guillaume *Guillaume*> who achieved *|10000|...

9 years ago | 3

Answered
Obtaining data from individual particles (represented by two columns)
One approach: fidi = fopen('strain rate v timet.txt','rt'); st = fseek(fidi, 1, 'bof'); ...

9 years ago | 0

Answered
How to include control input (u(t)) while estimating state space parameters using estimate function ?
I do not have the Econometrics Toolbox and so have never used the <https://www.mathworks.com/help/econ/ssm.estimate.html *|estim...

9 years ago | 1

| accepted

Answered
How can I save a file with the actual date?
If you want the _current_ year, month, and day, try this: tv = datestr(now, 'yyyy_mm_dd'); filename = sprintf('SURENAME...

9 years ago | 3

| accepted

Answered
How to print NaN for unexist value instead of error message
Try this: x = [1,2,3,4,5]; y = [3,4,5,6,7]; for i = 1: length(x) try out = x(i)+y(i+1); cat...

9 years ago | 0

| accepted

Answered
How do I delete a row from a matrix?
If *|‘M’|* os your matrix, this works: M = M(M(:,3)==1, :)

9 years ago | 0

| accepted

Answered
Error using get:
The problem may be how you call it. When I run: q = get(groot,'DefaultLineMarkerSize') I get: q = 6 ...

9 years ago | 0

Answered
Printing heading to text file using fprintf
I do not have *|‘D’|*, so I cannot run your code. Try transposing your matrix: fprintf(fileID,'%4u %2u %2.6d %2.6d %2...

9 years ago | 0

| accepted

Answered
Using binornd with population and mortality rates
*_I found the problem!_* Apparently, the *|‘N’|* array are not integers. They could be the result of calculations that res...

9 years ago | 0

Answered
histogram plot is emplty
You probably need to use the *|imhist|* function, since your *|uint8|* array may be an image. This works for me: M = ...

9 years ago | 1

Answered
how to extract colour percentages of contour plot
To get the area occupied by each contour level, it might be easier to use the <https://www.mathworks.com/help/matlab/ref/contour...

9 years ago | 0

Load more