Answered
loop while loop for
I suppose that what you are trying to get is dv/dt >=0.05. Here is how you can get it done: clc; clearvars; m = 36/1000; g=9....

1 year ago | 0

| accepted

Answered
How to delete a file when closing Matlab?
Use delete command the mat file called DONE.mat, e.g.: delete('DONE.mat') % e.g. One good option is to edit startup.m file %...

1 year ago | 1

Answered
Solving coupled ODEs via ode45
If your equation is implicit then, ode15i might be the tool to use. https://www.mathworks.com/help/matlab/ref/ode15i.html

1 year ago | 0

Answered
length error don't know why
Check this in the command window: which length If by mistake any variable or M-file was called by length, the variable can be...

1 year ago | 0

Answered
Error using imread>get_full_filename (line 566) File "gg(21).jpg" does not exist. Error in imread (line 375) fullname = get_full_filename(filename);
You can add the path to the directory where your images are located using addpath(), e.g.: addpath('C:\Users\new\Testing')

1 year ago | 0

Answered
Generate and acquire signals with a DT9857E box using Matlab
It is all about DAQ DT9857E issue. Once we had also the same issue - a kind of exponential decay. So far, I remember what we ...

1 year ago | 0

| accepted

Answered
help with wavelet analysis - wcoherence plot
If understood your question correctly, follow this doc: https://www.mathworks.com/help/wavelet/ref/wcoherence.html#d126e131143 ...

1 year ago | 0

Answered
How to move the Yaxis exponent outside
Here is one example how to get it done: % Sample data for plot display x = linspace(0, 2*pi, 100); y = 1e6 * sin(x); %% De...

1 year ago | 1

Answered
how to find point from Table data in Simulink?
Do the followings: Feed the temperature and density values as inputs to the lookup table block The output of the lookup tab...

1 year ago | 1

Answered
Ray tracing in antenna chamber
Have you checked out this documentation: https://www.mathworks.com/help/comm/ref/rfprop.raytracing.html?s_tid=answers_rc2-1_p4_...

1 year ago | 0

Answered
Is this a logical Error in Matlab ? exp (pi*i*6) = 1.000000000000000 - 0.000000000000001i. WHY an i component ?, should just be 1
It is all about a display format: format short exp(pi*i*6) % compare with this: cos(6*pi)+1i*sin(6*pi) % Compare this: fo...

1 year ago | 0

Answered
Multiple loops to build structure?
It can be done somewhat what like this one: GN = {'Group 1:'; 'Group 2:'; 'Group 3:'}; NA = {'North'; 'East'; 'West']; for ...

1 year ago | 0

| accepted

Answered
How do I graphic
The given inequality does not have explicit solution. Therefore, by ignoring analytical constraints, these can be obtained: sym...

1 year ago | 0

Answered
Starting with the ramp signal r(t) and unit step signal u(t) given below, please write the codes to plot the following transformed versions (a-f):
t=-10:10; figure plot(t,t); grid on xlabel('Samples') ylabel('Amplitude') title('Ramp') figure t2=[zeros(1,100), on...

1 year ago | 0

Answered
unable to connect blocks in Simulink
Use Simulink-PS converter block: https://www.mathworks.com/help/simscape/ref/simulinkpsconverter.html

1 year ago | 0

| accepted

Answered
how to plot two m.file in one plot
use plot(x, y), e.g.: x = [-5:5;2*(-5:5); 3*(-5:5)]; y = [3*x.^2+3*x-3; -5*x.^2+5*x-15; -2*x.^2-3*x-13;]; plot(x(1,:),y(1,:),...

1 year ago | 0

Answered
Inverse FFT of a matrix
Just looking at your attached figure, it is clear along x axis is time. inverse FFT gives back time domain data from freq domain...

1 year ago | 0

Answered
Why can't I run my code? (tfest function)
Here it is running ok: x = readtable('data_thermal_pulse.txt'); time = x.Var1; T1 = x.Var2-x.Var2(1); input = x.Var4; Ts = ...

1 year ago | 0

Answered
Why does this function not work for decimals?
Here is the corrected answer (Note abs(x)<=1): % x = input("Please enter the value of x (in radians): "); % Here "input" prom...

1 year ago | 0

| accepted

Answered
How to find an area below the curve follwed by x and y axis having two different parameters?
That would be something like this: DATA = [53 100; 26.5 88.5; 9.5 64.95; 4.75 46.85; 2.36 25.34; 0.85 23.14; 0.425 0;]; ...

1 year ago | 0

Answered
help understand the step size of the electrical engine dyno example
Click on Modeling Tab --> Model Explorer --> Base Workspace, and then you will see that the sampling time is 1E-5 in seconds. Se...

1 year ago | 0

Answered
How to randomly sample output times in Simbiology?
To randomly generate values using MEAN and STD values, normrnd() fcn can be used: MEAN_val = 15; % Mean in minutes STD_dev ...

1 year ago | 0

Answered
How to get rid of Noise in Simulink?
There are a few blocks can be used. E.g., Discrete Filter (Transfer Function), Discrete FIR Filter, etc., whcih can be found: Si...

1 year ago | 0

Answered
Matlab Plotting command problem
Even though you have not mentioned any error, there is a tiny point linked with hold on command. It needs to be followed at the ...

1 year ago | 0

| accepted

Answered
How to ignore special characters and retrieve the data prior to the character
Here is one possible solution, to get the data correctly from the data file: % Open the data file for reading FID = fopen('tem...

1 year ago | 0

Answered
Solve equations of motion containing matrices and partial derivatives
Your posted code has a few critical issues to be addressed before executing it. (1) epsilon_rp is undefined; (2) y(1) =4.3; bu...

1 year ago | 0

Answered
Summing two signals should result in zero, but doesn't
Note that the matlab's PRECISION is not ABSOLUTE. See this example of Pythogorian theorem: a = -pi:pi/100:pi; F = 1 - (sin(a)....

1 year ago | 0

Answered
how to convert a 3D surface into a 2D contour?
Note that it is clear from the colorbar scale (Figure 2 in your question) that there must be another operation before obtaining ...

1 year ago | 0

Answered
Error in resampling function
If you want to use fs = 5000 Hz, then the command syntax has to be resample(x_siganl, time, fs_new) This is how it should be don...

1 year ago | 0

| accepted

Answered
How to compute forces in global reference frame?
Presuming that you are also using some blocks from SimScape toolbox in the Simulink environment, here are some points to conside...

1 year ago | 0

Load more