Answered
how can i extract each element from excel and compare with a constant
I am not certain what you want. Try this: ElectricityPrice = randi(250, 50, 1); % Create Data Constant = 42;...

6 years ago | 1

| accepted

Answered
Can not make Legend border visible
This is a problem with certain AMD graphics drivers. First, see if there is an update for the AMD driver. If so, let the AMD...

6 years ago | 1

| accepted

Answered
Error using normcdf function
I am guessing that ‘Prx’ is a matrix, not a vector, and apparently ‘eixoXX’ is a vector. In that instance, the mean and std wil...

6 years ago | 0

| accepted

Answered
solve odes system with conditions
See my latest Comment to your previous Question: how to solve two differential equations with conditions ...

6 years ago | 0

Answered
How can i convert excel file to .mat format and call to matlab code
Provide the complete file path to ‘DAH.xlsx’ . That is easiest to do with the fullfile function.

6 years ago | 1

| accepted

Answered
how to solve two differential equations with conditions
Try this: syms y(t) syms x(t) w = 7.29*10^(-5); g = 9.8; syms l alpha k = sqrt(g/l); Dy = diff(y); Dx = diff(x); od...

6 years ago | 1

Answered
surface plot with white patches on using fsurf, but complete surface using ezsurf
The function produces complex values, and MATLAB plots plot only real values. One option is to use the abs function: fsurf(...

6 years ago | 1

| accepted

Answered
GA codes for linear regression equation
Since the fitness function must return a scalar value to the ga function, I would do something like this: x = [x1(:) x2(:)]; ...

6 years ago | 2

Answered
What does M([1:1 2:3], [1:0 2:3]) mean?
It is easier to understand if the values are calculated: row_ref = [1:1 2:3] col_ref = [1:0 2:3] produce: row_ref = ...

6 years ago | 2

Answered
How can i do curve fitting in complex field?
If the ‘x’ parameters are real and ‘w’ is real, and ‘eq’ is complex, one option would be to create your data as separate vectors...

6 years ago | 0

| accepted

Answered
Contour with proper scale
You ccan specify the number of contours you want (see Contours at Twenty Levels), and also their levels by providing a vector of...

6 years ago | 0

| accepted

Answered
how to find XLINE AND YLINE intersection
The intersections (in this example) are at all combinations of (i,j), in that order.

6 years ago | 0

| accepted

Answered
confidence interval for least square fitting
For the parameter confidence intervals in a linear problem, use the regress function. The ‘bint’ output will have them.

6 years ago | 0

| accepted

Answered
Re-defining variables
Create a vector of the angles, then plot against that instead: Angles = [5, 10, 16, 24, 32, 40]; figure plot(Angles, Data) ...

6 years ago | 0

Answered
How can I Compare a Signal with some Threshold Value as comparator to give output as 0 or 1?
Subscript ‘x’ as well to use the loop: out = zeros (size (t)); % Array to Show output less then ot greater then Threshold Valu...

6 years ago | 0

Answered
Finding the number of datapoints in a text file
Another option: A1 = readmatrix('IN01_SCALED.txt'); nonan = ~isnan(A1); A1 = [A1(nonan(:,1),1) A1(nonan(:,2),2)]; This actu...

6 years ago | 2

Answered
How to solve Leibnitz equation
Try this: syms C t F(t) F(t) = sqrt(pi)/sym(2) * diff(erf(C*t),t) F = vpa(F,2) producing: F(t) = 1.0*C*exp(-1.0*C^2*t^2...

6 years ago | 0

| accepted

Answered
Resampling data without altering the frequency of the data
The problem with the procedure you describe is that the requirements appear to be incompatible. Ideally, all the records will h...

6 years ago | 0

| accepted

Answered
How can find decibal sampl for audio
See if the Signal Processing Toolbox mag2db function will do what you want. Note that it is necessary to use the absolute val...

6 years ago | 0

| accepted

Answered
How do I determine the linear part of a force-displacement curve?
Try this: T1 = readtable('Moein M force-displacement.xlsx'); T1.Properties.VariableNames = {'Force','Displacement'}; ThrVa...

6 years ago | 1

| accepted

Answered
fInding the tresholhd of signal noise(really long narrow spikes).
The findpeaks function has a number of name-value pair agruments that can customise its behaviour to give the desired results. ...

6 years ago | 0

| accepted

Answered
90% Percentile of Matrix
Here are two possibilities, the second of which gives you the exact value in your Question: v = [0.289, 0.254, 0.287, 0.292, 0...

6 years ago | 3

| accepted

Answered
How a fill an array with the same value
Try this: N=4 V=zeros(N,1) + 10 Note that because of the way you wrote the zeros call, it will be a column vector, not the r...

6 years ago | 4

| accepted

Answered
How to find point of intersection of lines given y value
Try this: l = 5000; x1 = [0 290]; x2 = [22 233]; x3 = [60 190]; x4 = [80 300]; x5 = [100 439]; x6 = [150 384]; y = [0 l...

6 years ago | 0

Answered
Cell2Mat for cells with different dimensions
Try this: C={[21 24 47 89 57]' , [24 21]' , [16 87 47 89 90 99 182]'}; rows = cellfun(@numel,C); cols = size(C,2...

6 years ago | 5

| accepted

Answered
How to plot T versus t (time)?
Try this (after the loop): figure plot(t,T) grid xlabel('t') ylabel('T') xlim([0 1400]) .

6 years ago | 1

Answered
How to use Matlab built-in functions “tfdata” and “residue” and partial fraction decomposition
There appear to be several multiplication operators missing, and there could be missing parentheses. Try this: syms s P1 ...

6 years ago | 0

Answered
entering a space that survives the latex interpreter
Try this: plot(1:10) Title=sprintf('$\\theta%s.$', repmat('\ ',1,37)); title(Title,'Interpreter','latex') It may not be the...

6 years ago | 1

| accepted

Answered
How to find the frequency from data measured with a strain gage?
Try this: SG = load('DataSG.txt'); L = numel(SG); Fs = 1E+3; % Sampling Frequency ...

6 years ago | 0

| accepted

Answered
How to get the exact amplitudes of an irregular wave?
The second figure displays broadband noise. The easiest way to deal with that would be to denoise the original time-domain sign...

6 years ago | 0

| accepted

Load more