Answered
My graph is blank
You need to use element-wise division: m=0:0.1:5; n=(m-10)./m; plot(m,n); Replace / with ./ (note the dot operator), and it...

8 years ago | 0

| accepted

Answered
XTick labels for bar plot of 2 data sets
One way is to concatanate the 'XData' vectors of both series, and use that as the 'XData' value for the first (blue) bar series,...

8 years ago | 0

| accepted

Answered
Interpolation method (spline)
From the documentation: 'spline': ‘Spline interpolation using not-a-knot end conditions. The interpolated value at a query po...

8 years ago | 0

| accepted

Answered
How do you generate a stair up MATLAB function?
Try this: t = 0:100; s = floor(rem(t, 10.1)); figure stairs(t, s) Experiment to get the result you want.

8 years ago | 2

| accepted

Answered
Area plot common legend
Some version of this idea could work: dates = 1:5; % Create Data G = r...

8 years ago | 2

| accepted

Answered
Looking for low frequncy peaks from the FFT of a time series signal
Your frequency peaks are much smaller than the d-c offset in ‘dsignal’, so the d-c offset will dominate the Fourier spectrum. T...

8 years ago | 0

| accepted

Answered
How can I plot a circular surface with z axis to be a cos function?
Here you go! This code — a = linspace(0, 9*pi, 150); [A,R] = meshgrid(a); Z = cos(A); [X,Y,Z] = pol2cart(R,A,Z); fi...

8 years ago | 0

| accepted

Answered
How to read. mha file
See: How to read, display and process .mha files in MATLAB? (link)

8 years ago | 0

| accepted

Answered
Having issues plotting and coloring Limacon
You already have most of it done, and correctly, so congratulations! You need to keep the ‘r’ and ‘th’ calculations together,...

8 years ago | 0

Answered
How should I plot a sine with with a given frequency of 25 Hz and an amplitude of 2 volts?
See the documentation on the plot (link) function. It even has a relevant example.

8 years ago | 0

Answered
Put datetime scale in x-axis
The amount of data obscures all detail, however this works: [D,S] = xlsread('matlab.xlsx'); Q1 = D(1:5,:); m3 = D(:,2:5); s...

8 years ago | 1

| accepted

Answered
How to find an unknown constant in an integral equation?
It depends on what you want to do. To find a value of ‘C’ that provides the minimum value for the integral: IntFcn = @(C) i...

8 years ago | 0

| accepted

Answered
how to use helperGaitPlot?
Try this: query = which('HelperGaitPlot.m') When I run it, I get: query = 'C:\Users\<MyUserNameOnThisComputer>\Documen...

8 years ago | 0

| accepted

Answered
How to plot arrays of different lengths?
I would use the interp1 (link) function to interpolate one vector in terms of the other vector’s time. Example — DP_in_flow...

8 years ago | 1

| accepted

Answered
how can i plot and calculate signal area
To determine the envelope, use the envelope (link) function (introduced in R2015b). To help segment your signal into whatever...

8 years ago | 0

| accepted

Answered
what this error mean
It means that you need to save your function as a seprate function file (a ‘.m’ file with the same name as your function) on you...

8 years ago | 0

Answered
How to solve implicit function without using solve() function?
If you have the Optimization Toolbox, use the fsolve function: D = something; Re = something_else; func = @(f5) (1 / sqrt(f5...

8 years ago | 0

| accepted

Answered
Robust edge/flank detection - HELP!!
See if the midcross (link) function will do what you want. I would have suggested this earlier, however even though it has be...

8 years ago | 0

Answered
How to store iterated loop sine function in matrix?
If you must use a loop, you need to index into it: M=0.5; A=0.5; Fm=1; Fc=100; x=0:0.0001:1; ...

8 years ago | 1

| accepted

Answered
Manipulating a image of a yellow car.
The yellow background is relatively straightforward: A = imread('Yellow Car.jpeg'); GrayCar = rgb2gray(A); YellowBackground ...

8 years ago | 0

Answered
if function error, here i want MatLab to find the values of V5L that are between 1 and 4.5 and name it V, and use it in another upcoming equation
This works for me: Q = 3.3; D5L = [12.75*0.0254 14*0.0254 16*0.0254 18*0.0254 20*0.0254 22*0.0254 24*0.0254 26*0.0254 28*0.025...

8 years ago | 0

| accepted

Answered
Storing values from a for loop and plot
Plot with a marker, and use the hold function: Ndet = 10; NZ = 10; hold all for i=1:Ndet %(Signal) for b = 1:NZ %(No...

8 years ago | 0

| accepted

Answered
Plot figure - get title
The purpose appears to be to set the 'title' property of the legend object to be 'Order'. At least that what appears when I r...

8 years ago | 0

| accepted

Answered
Low pass filter that removes all the small ripples
I have no idea what signal you want to filter. I assume ‘E’, however ‘E’ does not look the signal you posted. Try this: D ...

8 years ago | 1

| accepted

Answered
Error in following matlab code.
The error comes from your current calculation of ‘x1’ as: x1(i) = x1(i-1) - x2; In the first iteration,i=1 so (i-1)=0. In M...

8 years ago | 0

Answered
How to Deal with Calculations Involving Large Numbers in the Numerator and Denominator That Results in a Small Number
One option would be the extended-precision capability of the Symbolic Math Toolbox, if you have access to it. Example — %% ...

8 years ago | 0

| accepted

Answered
Why is isstr not recommended?
The string (link) datatype was introduced in R2016b, along with a number of functions to work with it, of which isstring (link) ...

8 years ago | 0

| accepted

Answered
Half-Solved Expression Issue
It is not incomplete. The Symbolic Math Toolbox assumes that you want a symbolic result unless you tell it otherwise. Try th...

8 years ago | 0

| accepted

Answered
Unexpected ans output no idea why
I had this same sort of problem is code that I run frequently. The way I solved it was to put a return call in the middle of it...

8 years ago | 0

Answered
FIR filters and the delay associated with them
See if using the filtfilt (link) function or the zerophase (link) function will do what you want.

8 years ago | 0

| accepted

Load more