Answered
How to add missing rows in irregularly spaced table as per missing months and years?
I am not certain what you want to do, however the correct approach to dealing with the missiing values is to convert the table t...

3 years ago | 1

| accepted

Answered
How to change xticks on a histogram?
There are several ways to do this. Using xticks should work in R2022b — T2 = array2table(rand(100,10)*10); ...

3 years ago | 1

| accepted

Answered
Issue when input to sin(x) is in scientific notation
You are seeing the effects of different precision arguments. format long % Show Detai...

3 years ago | 2

| accepted

Answered
Issues with creating a frequency weighting filter for a iso-standard
I just saw your latest Comment now. The sampling frequency can be anything that you determine to be appropriate for the syste...

3 years ago | 0

Answered
Find crossing points of x and z data
It would help to have the data, and labeling the axes, since it is not obvious what ‘x’ and ‘z’ are. In their absence (and ma...

3 years ago | 0

| accepted

Answered
Sketch the graph using matlab
Use the linspace function to create the ‘x’ vector. Use element-wise operations to calculate ‘y’: y = (x.^3-1)./(sqrt(x) - ...

3 years ago | 0

Answered
Finding slope of a curve at some specific points
Probably the easiest way to calculate the instantaneous slope is: dydx = gradient(y) ./ gradient(x); All that is necessary af...

3 years ago | 5

| accepted

Answered
plotting transfer function / time domain version
I’m assuming here that ‘Q’ is the numerator polynomial and ‘P’ is the denominator poplynomial. (If that is not correct, it is e...

3 years ago | 0

Answered
how to install fractal function in matlab
If it is from the File Exchange, use the Add-On Explorer (in Add-Ons the right-hand region of the top toolstrip in MATLAB) to do...

3 years ago | 0

Answered
How to plot the actual frequency range for the FFT plot?
One approach — %% Signal parameter c = 3e8; % speed of light fc= 10e9; % carrier freque...

3 years ago | 0

Answered
Matlab file to analyse galvanic skin response not working properly
I suspect that there are actually more than 2905 rows in one of the variables (columns), although we do not have the data to ver...

3 years ago | 0

| accepted

Answered
Change values above bar
I am not exactly certain wher eyou want the bar values placed, so it may be necessary to edit the two text calls to create the r...

3 years ago | 0

| accepted

Answered
How do you add a multiplication in the numerator of a transfer function.
Perhaps this — num=5*exp(-1); den=[1 5]; g=tf(num,den) The exponential function here is a constant. If you intend to int...

3 years ago | 0

Answered
Finding random normally distributed number above zero
The truncate function is another option.

3 years ago | 0

Answered
how to find the location of a value
First, determine the value of the first valley, find the approximate index of the desired value, and then use interp1 to calcula...

3 years ago | 0

| accepted

Answered
Why my plot doesn't show up all of it?
All the curves are plotted, however they appear to be overplotted on top of each other. Plotting them using plot3 with an off...

3 years ago | 1

| accepted

Answered
How to Extract/Fit bell curves under a time series...
In order to uniquely identify the peaks and identify their parameters, it is necessary to restrict the range of ‘x’ values for e...

3 years ago | 0

| accepted

Answered
How to save result after run function for different input in matlab
I would just subscript it — subplot(2,2,1) [a{1},r2{1},stee{1}] = linregr(temp,visc) subplot(2,2,2) [a{2},r2{2},stee{2}] = ...

3 years ago | 0

| accepted

Answered
How to do custom equation (non linear) regression?
There are several nonlinear parameter estimation function to choose from. This uses fitnlm — yfcn = @(a,b,x) (a*x.^b)./(26....

3 years ago | 0

| accepted

Answered
How to do spectral estimation of a point process
For time-frequency analyses, I usually use the pspectrum function with the 'spectrogram' option.

3 years ago | 0

Answered
how to find max and min value within a certain range of a plot
Use the bounds function on the specific plot argument.

3 years ago | 0

| accepted

Answered
How to plot data of only specified rows of matrix
It is straightforward to create ‘y’ to test the code — y = randn(8,1000); % Create 'y' save(...

3 years ago | 0

Answered
Error while creating a table from cell
Perhaps this — LD = load('Mode_shape.mat') Mode_shape = (LD.Mode_shape); freq = Mode_shape{1}.freq; mode = cellfun(@(x)x....

3 years ago | 0

| accepted

Answered
Element Wise Multiplication Not Giving Expected Result
I get the ‘Expected result’ when defining ‘n’ and ‘m’ both as 1. Perhaps the indices are the problem? n = 1; m = 1; % ...

3 years ago | 1

| accepted

Answered
plot a tangent line of zero point
That should work, and it appears to be appropriate. Try something like this — clearvars clc; close all %% READ DATA FR...

3 years ago | 0

| accepted

Answered
How to output additional variables from objective function using ga optimization?
‘Does anyone have an idea on how to do that?’ After the optimisation terminates, run the objective function with the optimise...

3 years ago | 0

Answered
Getting error in using code num2cell
Run this from a script or your Command Window — which num2cell -all It should return something similar to this. If it retu...

3 years ago | 1

| accepted

Answered
How to identify the repeated elements in an array and delete those rows?
Use unique — A = [1 100 2 200 3 200 4 200 5 500]; [Au,ix] = unique(A(:,2),'st...

3 years ago | 0

Answered
How do errorbars change in logplot?
The error bars scale with appropriate axis scales, and negative error bars or error bars equal; to zero do not plot at all on a ...

3 years ago | 0

Answered
fplot and laplace transform
I am not certain what the problem is. The inversion appears to be correct, and the result is what I would expect it to be. Sin...

3 years ago | 0

| accepted

Load more