Answered
add transparency to a contourf
You have to use the handle to the contourf plot to set the transparency — [X,Y,Z] = peaks(50); figure contourf(X, Y, Z) ...

3 years ago | 0

| accepted

Answered
How to find the frequency of a morse code (sinusoidal signal) mixed with an audio music signal from a .wav file?
Start with the pspectrum function to analyse the signal, using the 'spectrogram' option, or just use fft, although if the Morse ...

3 years ago | 0

Answered
how to make an audio
I would use a Gaussian for the envelope function, similar to: envfcn = @(ct,sf,t) exp(-(t-ct).^2*sf); where ‘t’ is the time v...

3 years ago | 0

Answered
Need to print the output to newline while creating a table
In the loop, subscript the different assignments, for example: Var1(j,:) = type(j); Var2(j,:) = dx(j); and so for the rest. ...

3 years ago | 1

| accepted

Answered
Converting Y-axis values to the base of 10
This can be done easily using ytickformat (introduced in R2016b) — x = linspace(0, 2.5); y = 6*exp(-1.5*x) - 6; figure pl...

3 years ago | 0

Answered
How to get contour plot of multiple Datas in the same plot?
I did something like this recently in Contourf plot of magnitude of transferfunction along trajectory. See if you can adapt tha...

3 years ago | 0

Answered
Index in position 2 exceeds array bounds. Index must not exceed 2?
See my Comment to your earlier Question.

3 years ago | 0

Answered
Unrecognized function or variable 'lof'.
The lof function was introduced in R2022b. You will need to upgrade to the latest release to use it. (The onine documentatio...

3 years ago | 1

| accepted

Answered
Converting Date Format to serial date
I’m not certain what the decimals are, however they appear to be sequential so they may be fractions of a year. Unfortunately...

3 years ago | 1

| accepted

Answered
why my script doesnt run ?
Use fplot not plot here — syms s t ; %Space of Time % % t = 0:10:15000; % Commented-Out %Kelvie...

3 years ago | 0

Answered
How do i reset a fileID value?
Using: fclose('all') should close all of them. You can then start with fid = 3. Also, I lost count of the number of '%...

3 years ago | 0

| accepted

Answered
Read a file (other than .txt) as table in Matlab
This reads the file to a table, then eidts it to create a datetime array froim the first four columns, and replaces them with it...

3 years ago | 0

| accepted

Answered
ode45 is running an infinite loop
The system is ‘stiff’ bercause of the large differences in the parameter values. Use ode15s to get results — tspan = [0, 10...

3 years ago | 0

Answered
I need to group certain hours of a day into day and night categories from my xlsx file in the format "yyyy-MM-dd'T'HH:mm:ss."
The isbetween functin is the correct approach here, although if you have one set of 12-hour segments and you want to go over sev...

3 years ago | 0

| accepted

Answered
How to use FFT on my acceleration data in Matlab?
Try something like this — T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1203773/example.xlsx'...

3 years ago | 0

| accepted

Answered
polar plot in matlab from data and graphs in excel
I prefer readtable because it also imports the variable names. To do the plot, use the polarplot function. For more inform...

3 years ago | 0

| accepted

Answered
How to create a dynamic function handle?
I have no idea what you are asking. It is straightforward to create a function handle that accepts various function arguments...

3 years ago | 0

Answered
Plot timeseries for mean monthly temperature
Create a timetable of your data and then use the retime function.

3 years ago | 0

Answered
Why is it that if I try to fill a strange polygon it comes out of the edges?
Using polyshape is one option, and likely the only approach that would work here — x0 = [45;45;50;50;50;50;50;55;55;55;55;55;5...

3 years ago | 0

| accepted

Answered
Regridding 3D data
I am not familiar with Mapping Toolbox requirements (I don’t have it so have no experience with it), so I’m not certain what spe...

3 years ago | 1

Answered
Contourf plot of magnitude of transferfunction along trajectory
I do not have your data or a clear description of what you want to do, however I would do something like this — s = tf('s'); ...

3 years ago | 0

| accepted

Answered
How to get sidebars back?
Right-click just to the right of APPS (on a blank section of the bue bar). A small pop-up should appear that says ‘Restore Too...

3 years ago | 0

| accepted

Answered
Create an ellipse at 45 degree angle
I experiment with using the rotate funciotn on the rectangle and it wouldn’t move at all. Try this instead — v = linspace...

3 years ago | 0

| accepted

Answered
Getting A Blank Plot From Code
It is necessary to do element-wise division in the plot call second argument: d31multi./d31eff However there are other proble...

3 years ago | 0

Answered
How to add proper values on top of bar chart
There are too many missing variables to run the posted code. Try something like this (requires two separate text calls) — Y...

3 years ago | 0

Answered
Picking a particular column to norm in matrix
Consider using the vecnorm function.

3 years ago | 1

Answered
Plot error bars in curve fitting figure
Using fitnlm since I am familiar with it — x = 0:20; y = 1-exp(-0.25*x) + randn(size(x))*0.1; objfcn = @(b,x) b(1) - exp(b...

3 years ago | 0

Answered
I need to align 3 signals by cross correlation
The alignsignals function (or simlar functions such as findsignal) could do what you want. With 3 signals, it would be necessar...

3 years ago | 0

Answered
How Do I Replace Numbers with Alphabets
Use arrays — w1 = {'A','B','C','D','E','F'}; w2 ='ABCDEF'; w3 = ["F","O","R","M","A","T"]; for k = 1:6 L1{k,:} = w1{...

3 years ago | 1

Answered
Convert syms matrix to double
That is not possible. The reason is that the matrix contains symbolic variables. They have to be assigned numeric values to us...

3 years ago | 0

Load more