Answered
plotting number bigger than double realmax
One option would be to plot the base 10 logarithms instead. .

5 years ago | 0

Answered
how can i solve this system on matlab?
A different approach — syms L v x1 x2 x3 y1 y2 y3 sys = [(v+L ==1) (0.25==x1*L + y1*v) (0.45 == x2*L +y2*v...

5 years ago | 1

| accepted

Answered
How do I plot two distributions on top of each other?
To plot an additional distribution on the same axes, use the hold function. For the distribution itself, use the pdf function w...

5 years ago | 0

Answered
How do I calculate a logarithm of a variable base?
The general approach is: So: a = 64 log(a)/log(2) 2^(log(a)/log(2)) See the Wikipedia article on List of lo...

5 years ago | 0

Answered
how do i get the average line graph
I do not have your data, however since they all have the same number of elements as ‘time’ and so can be assumed to be equal len...

5 years ago | 0

Answered
stft plot doesn't match FFT results
If the frequencies are the same in both plots, the only difference is that the STFT plot spans -125 Hz to +125 Hz. The peaks ar...

5 years ago | 0

| accepted

Answered
system unstable although its poles are negative values
You nare not giving the isstable function the correct input. Try this instead — rs=0.84; Vin=40; Vfd=0; rL=.695; C=46.27e-6...

5 years ago | 0

Answered
How to fit multiple peaks/dips
‘Thank you for your response. I would like to smooth the curve so that I get only one peak instead of mutiple smaller peaks. As ...

5 years ago | 0

Answered
Plotting a stem plot of a Fourier series
Supply the correct values for ‘f0’, ‘w’ and ‘t’, and it works — % Plot amplitude vs frequencey f0 = 1; w = 2*pi*f0; n = ...

5 years ago | 0

| accepted

Answered
plotting a grid with red gridlines and where cells have different colors
One approach — N = 5; figure plot([1;1]*(1:N), (ones(N,1)*[0 N]).', '-r') hold on plot((ones(N,1)*[0 N]).', [1;1]*(1:N),...

5 years ago | 1

| accepted

Answered
How can I use solution of an equation as y-limit in an integral2 calculation?
Try this instead — syms x y f(x,y) = (x.^2+y.^2); g = x+y==10; ymax=solve(g,y) integr=int(int(f,x,0,10),y,0,ymax) Just ca...

5 years ago | 0

Answered
How do I run an array through a loop and store the results?
Subscript ‘x’ in each call to it to use each element as a scalar, then calculate the sum at the end — k=1; x=linspace(0,(pi/2...

5 years ago | 0

| accepted

Answered
Polar plot using excel data
The polar and polarplot functions require the angles to be in radians. So using degrees requires the deg2rad function — ang...

5 years ago | 0

| accepted

Answered
find minimal difference for vector (Optimalisation algorithm)
In the Optimization Toolbox, one option is the lsqcurvefit function. To use any of the others (or any of the Global Optimizat...

5 years ago | 0

| accepted

Answered
Is there a two-dimensional sinc interpolation software?
One-dimensional sinc interplation is described in Ideal Bandlimited Interpolation. It may be possible to adapt it to a 2D prob...

5 years ago | 0

| accepted

Answered
Bandwidth returns inf with discrete time transfer function
The -3 dB frequency is straightforward to calculate — alpha1=0.9; ts = 0.1; z = tf('z',ts); H = ((1-alpha1)/2)*(1-z)/(1-a...

5 years ago | 1

| accepted

Answered
Trying to convert cartesian coordinates to polar coordinates
‘I am concerned about the random dips with the small valleys like mass B at about 1 second and mass A at 4 seconds. Are those di...

5 years ago | 0

Answered
Issues with ode45
There are two problems (and one suggestion to improve its efficiency): First, ‘dymanics’ should only present the independent a...

5 years ago | 0

| accepted

Answered
tf is not working .
License and install the Control System Toolbox and the code should work. R=470; L=100E-3; C=0.22E-6; L = 0.1000; C = 2.20...

5 years ago | 0

| accepted

Answered
I want to find transfer function from given poles and zeros
One approach — K = 1; % Insert Correct Value p1 = -3.02E4 + 2.52E4j; p2 = conj(...

5 years ago | 2

| accepted

Answered
Is there a way for Densifying data towards the ends
I would use a weighting vector to weight the parts to be emphasized more heavily. One way to do that could be: N = 50; ...

5 years ago | 0

| accepted

Answered
Estimate Parameters for System of ODEs with given Data using a Genetic Algorithm (COVID-19-Model)
You found the code I was intending to direct you to when I just now saw this post. (My apologies for not seeing it earlier. Th...

5 years ago | 0

| accepted

Answered
Error when inputting step function
The code is missing a setp (pun intended) — m2 = 350; m1 = 10; Ks = 10000; Kw = 500000; b = 1000; Num = Kw* [b Ks]; De...

5 years ago | 1

| accepted

Answered
How to combine the matrices ?
One approach — A = rand(293,13); B = rand(392,13); C = rand(480,13); ABC = cat(1,A,B,C) .

5 years ago | 0

Answered
The transfer function of a small position Sensor
If you actually want the transfer function, use the System Identification Toolbox functions — Displacement_d_mm = [0, 0.08, 0....

5 years ago | 0

| accepted

Answered
rotating the plot axis
I am not certain what you intend by ‘rotate the axis’. It is a(4x4) matrix, so if you want to plot the transpose, just plot the...

5 years ago | 0

| accepted

Answered
Help Using Solve Function
Try something like this — Gamma=1.4 Mu_2=MuM(2.2, Gamma,10); M_2 = FindM_2(Mu_2,Gamma) function [M_2]=FindM_2(Mu_2,Gamm...

5 years ago | 0

Answered
How to make syms functions have specific values
One approach — syms c F(x) x dF = diff(F) F(x) = dsolve(dF == c, F(0)==0) c = solve(diff(F)==1,c) % ...

5 years ago | 0

Answered
Plot specific rows with an defined offset
One approach — f = 0:49; Spectra = rand(10, 50); Scores = randn(10,1); Offset = Scores; Offset((Offset>-0.5) & (Offset<0...

5 years ago | 0

| accepted

Answered
How to solve surface plot viewing issue?
Using an axes call could make the axis limits a bit more obvious, and to call attention to a specific point, one option is to d...

5 years ago | 0

Load more