Answered
How to generate random broadband vibration signal for certain frequency range ?
The usual approach is to generate a random signal (using either rand or randn) and then filter it — Fs = 500; ...

4 years ago | 0

| accepted

Answered
I cannot understand how to change the value of i in a 'text' code
Use sprintf — for i=1:num_nodes coord_matrix(i,1)= input(sprintf('What is the x-coordinate of node %d?',i)) end I can...

4 years ago | 1

| accepted

Answered
label is not at the center of axes
It is possible to force them to be exactly where you want them — t = linspace(0, 5, 500); x = cos(2*pi*t); y = sin(2*pi*t); ...

4 years ago | 0

| accepted

Answered
Extruding a 2D plot to 3D
Try this — k = -5:0.1:5; y = k.^2; figure surf([k;k], [y;y], [ones(size(k))*10; zeros(size(k))]) grid on colormap(turbo...

4 years ago | 0

| accepted

Answered
Basically I have the code for a 3d plot , now I need to plot Temperature (y axis) against length (x axis)
Try this — tspan=0:0.1:1; xspan=0:0.00002:0.0008; L=max(xspan); a2=4.46*10^-7; n=14; u=zeros(length(tspan),length(x...

4 years ago | 0

Answered
How can I multiply each row of 3 matrices individually?
The part of this involving and is ambiguous. It would help to know what and are, because it appears that is a vector, and...

4 years ago | 0

Answered
Display coordinates on the best location
The desirred result is not obvious. If I understand correctly what you want to do, there are two options: Use the xlim func...

4 years ago | 0

Answered
How to find the value of x when y = 0 and label on the curve?
Using interp1 — x = 0:0.01:66.03; y=(3.7*(10*(x/66.03).^3-15*(x/66.03).^4+6*(x/66.03).^5)-1.86); x_at_y0 = interp1(y,x,0)...

4 years ago | 0

| accepted

Answered
find the angles of a triangle given double coordinates
One approach, based on code I wrote for a different Answer — a1=1.49895; a2=2.62186; b1=1.49747; b2=2.62186; c1=1.49747; ...

4 years ago | 0

| accepted

Answered
I want to change the color of the markers in scatter plot which are below the function line
d = 4; N = 1000; X = linspace(0,d,N); func = @(X) 2*X.*cos(X.^2).*exp(sin(X.^2)) + 14; limit = func(X); x = 4*rand(1,...

4 years ago | 0

| accepted

Answered
How does the step function work?
You forgot to actually use the Heaviside unit step function as an input! num = [-5.21]; den = [1 6 73]; G = tf(num, den) ...

4 years ago | 2

| accepted

Answered
How do I filter my accelerometer data so that when I integrate it I have no drift?
The fft plot does not make sense. Before you do any signal processing (including the fft), first be certain that the signal i...

4 years ago | 2

Answered
How to add hours to the time data of one day
The hours would have to be added as a column vector, and the other variables repeated so that all the rows were the same. It is...

4 years ago | 0

| accepted

Answered
Predict function from system identification toolbox, which algorithm is it?
The documentation does not go into any details as to how it works. Aniother function that could be worth considreing is the f...

4 years ago | 1

| accepted

Answered
How to find Phase angle?
I am not certain that is possible for this system. since the roots are all real. See if getting the ‘Gains’ and ‘Roots’ will ...

4 years ago | 2

Answered
Unable to read completely a text file
Try something like this instead — data = textscan(fileID, '%d %f %d %d %d;') The format string should then read it correctly....

4 years ago | 0

| accepted

Answered
How to plot Fourier transform against frequency?
I am not certain what you want to do. Try this — n = 400; %number of points F1 = 3; %frequency 2 F2 = 2; %frequen...

4 years ago | 1

| accepted

Answered
I cannot change the datetime x axis locale setting in the plot function.
In the datetime documentation under Input Arguments see 'Locale' (there is no direct llink to it). Defining: MyDatetimeArra...

4 years ago | 1

| accepted

Answered
How to remove noise from the signal analyzed by fft
Probably the easiest way to deal with a noisy signal (considering that the nature of the noise is not stated here) is to use the...

4 years ago | 0

| accepted

Answered
Attenuation as a Function of Frequency
I am not exactly certain what you are diong, however the procedure described, ‘In the frequency domain I divide the back wall of...

4 years ago | 0

| accepted

Answered
Use System Identification Toolbox Model with input parameters
From the polyest documentation: [sys,ic] = polyest(___) returns the estimated initial conditions as an initialCondition objec...

4 years ago | 0

| accepted

Answered
How to check whether datetime is within range
There are several ways to do this, all using logical indexing. The easiest way is with the isbetween function. C = strsplit(...

4 years ago | 0

| accepted

Answered
How can I find the number of major peaks in an energy spectrum
Use the findpeaks function, and set 'MinPeakProminence' to the value that gives the desired result.

4 years ago | 0

| accepted

Answered
Function to return Interpolated Value at one query point
Use the griddedInterpolant function, and then experiment with the actual data to see what gives the best results — xA = (rand(...

4 years ago | 0

| accepted

Answered
colorbar for line plot number
The colorbar apparently does not want to do this by itself, since it appears to scale to the ‘z’ values in a 3D plot (or equival...

4 years ago | 0

| accepted

Answered
Plotting powers of 10 on the colorbar
These are 'Ruler' properties, and they are not in the colorbar documentation. (I had to go searching for them, and then experim...

4 years ago | 1

| accepted

Answered
How do I get MLE(Maximum Likelihood Estimation)?
See the documentation on the mle function. LD = load('1민제 강 data.mat'); data = LD.data; [phat,pci] = mle(data) figure h...

4 years ago | 1

| accepted

Answered
Getting empty solution for second order differential equation
It apparently does not have an analytic solution. Integrate it numerically — syms x(t) t Y ode = diff(x,2) + 2*diff(x) + ...

4 years ago | 1

| accepted

Answered
How to define second derivative in symbolic
Use the symbolic diff function — syms A r(A) = cos(A) D1r = diff(r) D2r = diff(r,2) .

4 years ago | 0

| accepted

Load more