Answered
Convert cross sectional data into surface
Here is one possible approach. *_The Code_ —* V = [5.8645 11.4836 12.6726 11.587 11.3566 10.2168 9.8317 10.0888 10....

8 years ago | 0

| accepted

Answered
Matrix dimensions must agree.
To integrate a vector, use the <https://www.mathworks.com/help/matlab/ref/quadv.html *|quadv|*> (link) function. If you hav...

8 years ago | 0

| accepted

Answered
Calculating partial molar property
You will need to use the Symbolic Math Toolbox for this: syms n n1 n2 y1(n1) = n1/n; y2(n2) = n2/n; a(n1,n2) = 2...

8 years ago | 1

| accepted

Answered
Problem in setting Yaxis value
I don’t remember when that was introduced. It was obviously after *|R2015a|*. One approach to a work-around: x = lin...

8 years ago | 0

| accepted

Answered
How to read hypnogram file (.hyp) in matlab
Files with a *|‘.hyp’|* extension are annotation files. They are intended to be used by the Physionet software, not read indivi...

8 years ago | 0

| accepted

Answered
How to surf a specific contour ?
For an example, see: <https://www.mathworks.com/matlabcentral/answers/313108-how-to-convert-2d-graph-to-3d *how to convert 2D gr...

8 years ago | 0

| accepted

Answered
How can I create a vector of ratios from columns in a matrix?
Since *|‘a’|* is a matrix, you likely have to use _two_ subscripts to it in your *|if|* statement, not one.

8 years ago | 1

| accepted

Answered
How to calculate areas between two curves
I am not certain what you want to do. Try this: x = 1:numel(curve1); % Use The...

8 years ago | 1

| accepted

Answered
How to divide a 3d matrix by a 2d matrix along one dimension
See if <https://www.mathworks.com/help/matlab/ref/bsxfun.html *|bsxfun|*> (link) will do what you want: Data = bsxfun(@rdi...

8 years ago | 0

| accepted

Answered
i have 2 linear equations 2 unknowns
Using the Symbolic Math Toolbox: syms b0 b1 c0 c1 Eq1 = b0 == c0+3*c1; Eq2 = b1 == c0-5*c1; [c0,c1] = solve(Eq...

8 years ago | 0

| accepted

Answered
How to use textscan to read my 2nd column and ignore the string or non numerical values?
Your file is not easy to import. I’ve been working on this for a while. Try this: fidi = fopen('M1output1.txt','rt')...

8 years ago | 1

| accepted

Answered
Plot range of values as bars
One approach: Tmax = randi([25 30], 1, 10); % Create Data Tmin = randi([15 20], 1, 10); ...

8 years ago | 7

| accepted

Answered
how to add numerical results to legend in matlab plot?
I would use the <https://www.mathworks.com/help/matlab/ref/sprintf.html *|sprintf|*> (link) function to create a string, then us...

8 years ago | 0

Answered
How to solve a third order polynom?
Use the related *|vpasolve|* function for *|‘eqn2’|*: vpasolve(eqn2,x) 30.0000...

8 years ago | 1

| accepted

Answered
Reshape matrix whilst maintaining pairs ordering
It always helps to have an example of the matrix you are starting with, and your intended result. Does the <https://www.mat...

8 years ago | 0

| accepted

Answered
How to do linear regression?
To do a simple linear least-square fit, see the <https://www.mathworks.com/help/matlab/ref/mldivide.html *|mldivide,\|*> (link) ...

8 years ago | 1

Answered
calculate the mean value if the numbers are same
One option: M = [ 2 0.99 0.15 0.60 0.12 0.76 0.16 0.81 0.02 0.75 0.32 2 0.17 0.38 0.34 0.02 0.74 0.67 0.75 0.92 0.2...

8 years ago | 0

| accepted

Answered
How to display a Localized Time of a specific city?
You need to use the correct format, and the correct syntax for the time zone. (I am using *|R2018a|*, although I would be surpr...

8 years ago | 0

| accepted

Answered
ASCII to Decimal numbers
It looks like a binary file. See the documentation on the <https://www.mathworks.com/help/matlab/ref/fread.html *|fread|*> (lin...

8 years ago | 0

| accepted

Answered
Help with TF and STEP function
See if this does what you want: TF1 = tf([3 7],[1 2 5]) figure h2 = step(TF1, Inf); figure stepplot(TF...

8 years ago | 1

| accepted

Answered
How to get a inverse laplace of a tf?
You can derive inverse Laplace transforms with the Symbolic Math Toolbox. It will first be necessary to convert the *|‘num’|* a...

8 years ago | 11

| accepted

Answered
How do I rotate contour plot?
It would help to know how you calculated your data, and what you’re plotting. Rotating the plot _might_ be as simple as reversi...

8 years ago | 0

Answered
Plotting peaks and troughs of a large oscillating simulation data
One option, if you are using *|findpeaks|*, is to negate it and then plot the negative of the peaks. *_Example_ —* t ...

8 years ago | 1

| accepted

Answered
how to open csv and plot contour data
You can probably just use the <https://www.mathworks.com/help/matlab/ref/contour.html *|contour|*> (link) function. *_Examp...

8 years ago | 0

| accepted

Answered
How can I solve this Problem?
Use the <https://www.mathworks.com/help/symbolic/isalways.html *|isAlways|*> (link) function.

8 years ago | 0

Answered
Merge fft data sets
I would take the _ensemble average_, either of the time-domain signals before you take the *|fft|*, or of the individual Fourier...

8 years ago | 0

| accepted

Answered
plot doesn`t work (probably unrelated to the code )
For *|‘pulseRC1’|*, you either need to define *|‘a’|*, or give it a range and use the <https://www.mathworks.com/help/symbolic/f...

8 years ago | 0

| accepted

Answered
Error using sym/cat>checkDimensions (line 70) CAT arguments dimensions not consistent.
I did not troubleshoot *_all_* the errors that might be in your code, only the ones in the *|‘eqs’|* vector. Spaces are importa...

8 years ago | 2

| accepted

Answered
"simplify" doesn't work properly
Choosing the correct function is important. Without knowing your _actual_ expression (so I do not know if this is appropriate f...

8 years ago | 2

| accepted

Load more