Answered
How to plot a ramp waveform function using Matlab?
The definition of a ramp function is important here, and it is not defined in your Question. See if the tripuls or sawtooth fu...

7 years ago | 0

Answered
Can anyone solve this error
The documentation for the cd function, and the error your code threw, should tell you everything you need to know about it. I...

7 years ago | 0

Answered
the mysterious for loop
The doubled logical operators are for scalar logical comparisons. Use single logical operators for vector comparisons. The any...

7 years ago | 0

| accepted

Answered
Pressure as a function of crank angle
Two options for the plot, depending on what you want to do: Plot in the loop: figure hold all for alpha=0:0.2:2*pi p=(p...

7 years ago | 0

| accepted

Answered
How can I create new variables from a range in a matrix based on values?
I am not certain what you want. Try this: D = load('spxDrwDwnData.mat'); A = D.spxDrwDwnData; Thr = -0.05; ...

7 years ago | 0

| accepted

Answered
How to not get an ans from function?
There are at least two possibilities. (1) You have omitted a closing semicolon (;) somewhere in the function. (2) You cal...

7 years ago | 0

| accepted

Answered
Stopping a loop on the peak
Change the if block to: if (i > 1) & (M(i)<M(i-1)) break; end and your code appears to give the desired res...

7 years ago | 0

| accepted

Answered
Error using plot Vectors must be the same length.
To create ‘y’ to be the same length as ‘t’, use the 'same' shape argument in conv: y= dt.* conv (x,h,'same');

7 years ago | 0

Answered
ERROR : "Input arguments must be convertible to floating-point numbers"
The min function is not compatible with symbolic objects, for obvious reasons. Try this instead: b=300; %mm d=400; %mm ...

7 years ago | 1

Answered
how to create magnitude spectrum signal based on data from excel
Your code needs a few slight improvements: dataset=xlsread('Group3.xlsx','Sheet1','A1:ALM1'); stepsize=0.001; N=1; t=0:step...

7 years ago | 0

| accepted

Answered
How can I solve a system of differential equations where one equation contains the answer to another?
If you have the Symbolic Math Toolbox, let it do the ‘heavy lifting’: syms omegax(t) omegay(t) omegas Omega(t) epsilon sigma a...

7 years ago | 0

| accepted

Answered
cannot get fftshift to shift frequency
You need to create the frequency vector yourself. Probably the easiest way is to use the linspace function. Try this: VAC...

7 years ago | 0

| accepted

Answered
Example ('predmaint/RollingElementBearingFaultDiagnosisExample')
From the documentation on Rolling Element Bearing Fault Diagnosis: ‘For the full dataset, go to this link https://githu...

7 years ago | 0

| accepted

Answered
Passing a vector through a built in function?
Do element-wise multiplication and division: V=sqrt((2*W.*cosd(theta))./(CL*p6000)); ↑ ↑ S...

7 years ago | 0

| accepted

Answered
How do I get the date out of a filename using regexp?
There are likely several ways to approach this. I would do it a bit differently: str = 'xxx_2014_06_03_00_00_01'; fdate = re...

7 years ago | 0

| accepted

Answered
Name the first column in array2table
The code you posted produces an acceptable table object. I am not certain what you want. I am guessing here: coeff = rand(...

7 years ago | 1

| accepted

Answered
I'm trying to define a simbolic variable like ¨ syms x ¨. I used to do it but now It doesn't work..
Run these lines from your Command Window or a script: restoredefaultpath rehash toolboxcache If doing that does not solve ...

7 years ago | 1

| accepted

Answered
Reduce data points from 200 to 108
I have no idea what your data are or what you want to do with them, other than reduce the number of them. Interpolating them ...

7 years ago | 0

| accepted

Answered
How to make 3D-line plots (Sine Wave)?
With three small changes to your code, it works: t = 0:0.01:5*pi; z = 0:pi/12:2*pi; phase = 0; ...

7 years ago | 0

| accepted

Answered
'Character vector is not terminated properly' when I am trying to open a .fis file in MATLAB
You likely either forgot a closing single quotation mark (') or you inserted one in error. Without seeing your code, it is no...

7 years ago | 2

| accepted

Answered
Identifying x value at y on an xy plot
A common problem interpolating y-values that are not unique is how to make them appropriate for interpolation. One way is to si...

7 years ago | 0

| accepted

Answered
Plots appear as giant blocks rather than actual waveforms
The waveforms are there. The problem is that they are very densely packed in those images, so they appear as blue blocks. Us...

7 years ago | 0

| accepted

Answered
Area between curve (numerical data with positive and negative values) and y = 0
I do not have a clear idea of what you want as the result. It is relatively straightforward to integrate the areas greater th...

7 years ago | 0

| accepted

Answered
Average of Wave from 10 waves in single graph
Try this: D = load('P_191005_000.mat'); ap = D.b; Ts = 1E-3; ...

7 years ago | 3

| accepted

Answered
How to take Average of many waves to single wave(want he averge of all waves to a single wave)
Used the islocalmin function to find the minima of the waveform, then use those indices to store the wave segments in a cell arr...

7 years ago | 2

| accepted

Answered
give labels according to string
Try this: String = {'Abc\a1\L\XYZ1R08' 'Abc\a1\R\XYZ1R09' 'Abc\a1\R\XYZ1R10' 'Abc\b2\L\XYZ2L01' 'Abc\b2\R\XYZ2L02' 'A...

7 years ago | 2

| accepted

Answered
Help, How to convert image to binary image ?
See if im2bw (R2015b and earlier) or imbinarize (R2016a and alter) will do what you want.

7 years ago | 0

| accepted

Answered
find transfer function of input and output signals and then perform an FFT.
This should get you started: [D,S] = xlsread('Test_data_1.xlsx'); torg = D(:,1); ...

7 years ago | 2

| accepted

Answered
Extract and code gender string as number using if loop
I do not udnerstand the reason strcmp or strncmp would not work with your structure data. We may have to see ‘tempfile.data.gen...

7 years ago | 0

| accepted

Answered
Interpolation of scattered earthquake data
There are several options. First, see if the griddata function will do what you want. (The Mapping Toolbox may have more appli...

7 years ago | 0

| accepted

Load more