Answered
How can I add two fft functions?
It is obvious from looking at the code that the fft results have different lengths, specifically 523 and 1046 elements in each. ...

2 years ago | 1

Answered
Where is the month, day and year string stored in a plot with a datetime axis which shows hours and minutes in the xticklabel string?
If you have R2023b, you can use the recently introduced xsecondarylabel function — t1 = datetime('2023-04-01 04:00:00'); t2...

2 years ago | 0

| accepted

Answered
area in trapz coming out negative
‘... was wondering if I can just take the abolute value and if that would be bad data?’ If the descending values of the indep...

2 years ago | 1

Answered
Error using fopen for obj file
A returned value of -1 means that fopen can’t open the file. First, run: which fileIn to see if MATLAB can find it. If no...

2 years ago | 1

| accepted

Answered
Problem with fitting a loglog plot
Using a linear regression on logarithmically-transformed data creates multiplicative errors, not additive errors that least squa...

2 years ago | 0

Answered
How to use symbolic equation?
For symbolic plots, use the fplot function — syms Wosc R C gm Ao = gm*R/(1+2*pi*Wosc*R*C); pretty(Ao) R = 1000; C = 27...

2 years ago | 1

| accepted

Answered
Add a line on the graph
Try this — num_simulations = 10000; %Common parameters Discount_Rate_min = 0.06; % assume 6-8% Discount_Rate_max = 0....

2 years ago | 2

| accepted

Answered
Combination of two tables with different time lines
Converting the times in the first file is straightforward. Everything else seems to be NaN. T1 = readtable('Combining1.xlsx'...

2 years ago | 0

| accepted

Answered
How to solve the error for graph?
I tweaked your code a bit, however it is still incorrect. The main problem is that ‘avg_LCOH_SOEC’ should be a (24x24) matrix...

2 years ago | 0

Answered
Adding the stl file to the Matlab simulation
It depends what the .stl file is. The first step would be to use the stlread function to import it, and then use trisurf (or...

2 years ago | 0

Answered
How can I specify the region of the contour plot ?
Without the data or the contour levels labels, a precise reply is not possible. If you know that all the data are either greate...

2 years ago | 0

Answered
Getting NaN after filtfilt function
You are using transfer function (‘[b,a]’) output implementation. Often, this creates an unstable filter, producing NaN values i...

2 years ago | 0

| accepted

Answered
How to plot different datasets in a scatterplot next to each other at discrete points on x-axis?
See if the swarmchart function (introduced in R2020b) will do what you want.

2 years ago | 1

Answered
What code will open .stl files successfully?
I am having serious problems trying to access that file. (I’ll keep working on it.) The patch function requires ‘x’, ‘y’, (a...

2 years ago | 0

Answered
Can I assign vectors with different number of rows per-column to a matrix?
I would use a cell array. It is not as convenient to use as a numeric matrix, however it tolerates different length vectors.

2 years ago | 0

| accepted

Answered
I'm dealing with Speech compression using Linear Predictive Coding. When I run the code I get a few errors.
This is the path to the file, however it does not include the file name (and extension): kdt_003 = fullfile('C:\Users\user\Des...

2 years ago | 1

| accepted

Answered
mapping bode plot for Low Pass Filter
You need to do element-wise exponentiation (.^) and division (./) — R = 1000; C = 100*10^(-9); tau = R*C; w = 0:100:100000;...

2 years ago | 0

Answered
how to find the values that minimize the objective function using the generic algorithm?
I used some standardised code that I wrote for these sorts of problems that I adapted to your data — clear all close all clc...

2 years ago | 0

Answered
find max for every 7 rows
Use either the reshape or the Signal Processing Toolbox buffer function for each variable. Example — Data = randn(49,2) ...

2 years ago | 0

Answered
How to synchronize three measurment data?
This turned out to be a bit more involved than I thought it would be. The data matrices do not have the same lengths and the sa...

2 years ago | 1

| accepted

Answered
Using coefficients from designNotchPeakIIR generated an error message
The filtfilt function needs a 6-column second-order-section matrix and a scale factor. The matrix can be created by horizontall...

2 years ago | 0

| accepted

Answered
How do I target values within a range for different variables within the same given time series?
I do not completely understand what the data are, or the lengths or content of the various data arrays. It might be worthwhil...

2 years ago | 0

Answered
how to use freqz function correctly
You can set the 'XLim ' range for the subplot axes, however that may be a bit of a stretch even then. Another option is to sign...

2 years ago | 0

Answered
How to obrain p-values for coefficients with polyval - polyparci?
‘... but there is no built-in way to have p-values for those coefficient?’ There is now. I did not realise that there was a ...

2 years ago | 0

Answered
Unrecognized function or variable 'tradeoff'
The only reference I can find in the File Exchange is MTEX2Gmsh. If this is the correct citation, you will need to download a...

2 years ago | 0

| accepted

Answered
I have two peaks in my doppler signal. 1 @ zero and other @ actual velocity.
I am not certain what your data are, however the ‘peak’ at D-C (0 Hz) is likely the result of a constant D-C offset. Subtract...

2 years ago | 0

Answered
Is there a Matlab built in function to determine the domain of a function?
The Symbolic Math Toolbox has the argnames function.

2 years ago | 0

Answered
how can I make a custum legend in a second figure?
It is difficult to follow your code. One optioni would be to use the 'DisplayName' name-value pair as described in Specify ...

2 years ago | 0

| accepted

Answered
How to get different sizes of horizontal and vertical error bars?
One option would be to use: axis equal or: axis('equal') There is no obvious way to scale them otherwise.

2 years ago | 0

Answered
Image display error when using surf
MATLAB 7.1 was introduced in 2006. I cannot find any documentation for the Signal Processing Toolbox for it (that likely explai...

2 years ago | 1

| accepted

Load more