Answered
data import from excel (csv)
This is perhaps a bit more complicated than it might be, however readtable does not import it properly, so other approaches are ...

7 years ago | 0

| accepted

Answered
how to get a contour from a matrix that its values varies between zero and one?
Try this: M = rand(10); figure contour(M) figure contourf(M) See the documentation on contour for more information. ...

7 years ago | 0

Answered
convert excel date to datetime
The format has to match exactly. Both of these work: S.textdata = '20-Nov-18 12:00:00 PM GMT'; d1 = datetime(S.textdata(...

7 years ago | 0

| accepted

Answered
How can I change a colorbar title interpreter to latex?
This seems to work (in R2019b): surf(peaks) c = colorbar; c.Label.String = 'Elevation (ft in 1000s) $\frac{1}{2}$'; c.Label...

7 years ago | 3

| accepted

Answered
Specific if statement question
It is possible, although you may have to do a bit of coding to get that result. See Find Symbolic Variables in Expressions, Fun...

7 years ago | 1

| accepted

Answered
readvars not a deifned function?
The readvars function was introduced in R2019a. If you are using R2018b or earlier, you will not be able to use it. The solu...

7 years ago | 1

Answered
Using For Loop in a function over all files in a folder with Matlab
This seems to refer to the Hurst exponent. See the File Exchange contribution Calculate Complex Hurst. Also see Import or ...

7 years ago | 0

Answered
How do I create a .dat file containing both numbers and letters?
I would create your variables as a table A = [5.2; 3.2; 4.4; 4.5]; B = [6.4; 5.5; 4.3; 2.2]; T = table(A,B) producing: T ...

7 years ago | 0

Answered
Using ODE 45 coupled ODEs
Start with what you already have: syms X(t) y(t) Y k = 0.0440; C_A0 = 0.3045; epsilon = 2; alpha = 0.001; F_A0 = 2.5; r...

7 years ago | 0

| accepted

Answered
How to plot wakes
The comet function may do what you want.

7 years ago | 0

| accepted

Answered
Frequency and Sampling Frequency
This is more a philosophical question than a mathematical one. The frequency of the original signal remains ‘fs’ regardless, ...

7 years ago | 1

| accepted

Answered
Solving an equation with one variable
One approach: Out = fzero(@(y) (q*a^4/(E*t^4)) - k1*y/t + k2*(y/t)^3, 2) That assumes that all ‘constants’ are scalars. Choo...

7 years ago | 1

| accepted

Answered
what is happening here?
‘in this code what does "1:6-1" means?’ It is a kludgy way of writing: 1:5 as running it will demonstrate: q = 1:6-1 pr...

7 years ago | 1

| accepted

Answered
plot a defined function
You can define ‘N’ as an anonymous function. Try this: N = @(T) 0.5*(sum(abs(eig(partialtranspose(T))))-1); Tv = linspac...

7 years ago | 0

| accepted

Answered
Plot multiple implicit functions
Try this: %% Main Sv = 1:0.1:2; % Define The Range Of ‘S’ As A Vector figure hold...

7 years ago | 0

| accepted

Answered
how to plot time from string
Use the 'Format' name-value pair: T = ['21:01' '21:02' '21:03' '21:04']; Time2plot = datetime(T, 'inputf...

7 years ago | 0

| accepted

Answered
Isolating k fourier peaks
Use the Signal Processing Toolbox findpeaks function, with the name-value pair arguments SortStr and NPeaks.

7 years ago | 0

| accepted

Answered
Problem by star values lsqcurvefit
I used the genetic algorithm (ga function) to fit them, and it took several attempts before I got a good set of parameters. T...

7 years ago | 1

| accepted

Answered
How to change the order in a combined plot
It would be easier with your data. You are plotting a 3D scatter plot, so to put the isolines on top of it, you have to use p...

7 years ago | 1

| accepted

Answered
How Can I White Space From Both Axis in Surface Plot?
See the axis function section on Set Axis Limits. You can set them to be whatever you want.

7 years ago | 1

| accepted

Answered
Solve System with many variables
See if the Optimization Toolbox fsolve function will do what you want.

7 years ago | 0

| accepted

Answered
Solving first order differential equation
You need to re-formulate your ‘first_order’ function. MATLAB derives a different set of equations: syms A B h(t) L r U h0 Y ...

7 years ago | 0

| accepted

Answered
ODE Solver with array value parameter
Try this example: yv = randn(1002,1); % Create ‘y’...

7 years ago | 5

| accepted

Answered
Assigning random numbers to multiple vectors
I am not certain what you are doing, or what the requirements of what is probably a homework problem are. First, ‘sEggs’ and ...

7 years ago | 0

| accepted

Answered
Hi there. i want to know that how can i change my MATLAB scale from scientific notation to mannual? I have my values on Y axis as [668.85 2548 5733 10192 15925 22932]
See if the Numeric Ruler Property Exponent does what you want. (This was introduced in R2015b, so it will apply to that and lat...

7 years ago | 0

Answered
How to save vector from loop?
The essence of what you have should probably work. One change: r{v+1} = x(imag(x)==0); This saves ‘r’ as a cell array, all...

7 years ago | 0

| accepted

Answered
How do I upgrade my MATLAB from 2019a to 2019b
See if Get the Latest Release does what you want.

7 years ago | 1

Answered
naming your rows and column for a matrix
Use array2table to put your matrix in a table (R2013b and later). Name the columns with Specify Variable Names, and the rows w...

7 years ago | 2

Answered
Defining the limits for discrete time sequence on x axis using stem command
Add these lines to each subplot: xt = get(gca, 'XTick'); set(gca, 'XTick',min(xt):max(xt)) so the revised code is now: x=[...

7 years ago | 0

| accepted

Answered
How to locate a decimal in a matrix?
It depends on what you want. If you want the indices, use both. If you want the values, just rem (or mod) will work. Try th...

7 years ago | 1

| accepted

Load more