Answered
How can I use decreasing x-data using findpeaks?
May be you should try: [pks, LOCS] = findpeaks(GlucoseS3{:,1}, GlucoseS3{:,4});

5 years ago | 0

Answered
Autmating a matlab script
matFiles = dir('*.mat') ; N = length(matFiles) ; for i = 1:N load(matFiles(i).name) ; % you need to see how the varia...

5 years ago | 1

| accepted

Answered
not getting line in my plot? why
Vc=0.1:0.1:0.5 ; V_tip=180 ; rho=1.225 ; w=180 ; sigma=0.047193 ; Cd_avg=0.01 ; R=2.235 ; Rv=80.529 ; A=pi*R.^2 ; Vh=s...

5 years ago | 0

Answered
how to use curve fitting without using curve fitting toolbox?
Refer this: https://in.mathworks.com/help/curvefit/curve-fitting.html

5 years ago | 0

Answered
How to save a sequence of images into a specific folder
ImageFolder ='C:\Users\person\Desktop\ Project\Matlab\Image Saving Test'; for i=1:5 % this loop will take 5 pictures and save t...

5 years ago | 2

Answered
How to save a sequence of images into a specific folder
ImageFolder ='C:\Users\person\Desktop\ Project\Matlab\Image Saving Test'; for i=1:5 % this loop will take 5 pictures and save t...

5 years ago | 1

| accepted

Answered
how to write a code second order diffrentiation code in MTLAB
st = -1; inc=0.001; en =1; t=st:inc:en; y= t.^3; x=zeros(1,(length(i)-2)); for i=1:(length(t)-2) x(i)=(y(i+2)-2*y(i+1...

5 years ago | 0

| accepted

Answered
Element subtraction of same matrix
A = [2,5; 3,8]; B = [2-2, 2-5, 2-3, 2-8; 5-2, 5-5, 5-3, 5-8; 3-2, 3-5, 3-3, 3-8; 8-2, 8-5, 8-3, 8-8]; A1 = A' ; ...

5 years ago | 2

Answered
Finding the maximum value in a specific row of a matrix
M = [3 6 1 -2; 3 0 -2 -4; 8 -3 5 4; -2 -3 -2 5]; [val1,idx1] = max(M(4,:)) % maximum in the row 4 [val2,idx2] = max(M(:,3))...

5 years ago | 0

Answered
how to animate two plots at the same time?
Put this line: comet3(xv,yv,zv) %xv yv zv are the values I get from solving the 2-body problem which I didn't include here int...

5 years ago | 1

| accepted

Answered
index exceeds the number of array elements (1).
This error occurs when you try to extract more number of elements than present in the array. EXample: A = rand(1,10) ; A(1) ...

5 years ago | 0

| accepted

Answered
Plot will not show lines
x = -0.923 : 0.01 : -0.633 ; f = 16*x.^3 - 13*x.^2 + 12*x + 15 ; g = -7*x.^3 - 6*x.^2 + 4*x - 6 ; plot(x,f, x,g) ylabel('...

5 years ago | 0

| accepted

Answered
drawing a best fit graph
I = imread('image.png') ; I = rgb2gray(I) ; [y,x] = find(~I) ; % Get center idx = boundary(x,y) ; x = x(idx) ; y = y(id...

5 years ago | 0

Answered
Find all values between 2 index columns
for i = 1:size(c,1) value = dataset(C(i,1):C(i,2)); end

5 years ago | 0

| accepted

Answered
I'm trying to create three curves, but my plot is blank
Code looks meaning less though. mi = [2814 1000 19781]; c(1) = 2080; c(2) = 1580; c(3) = 2580; v = c*log(19781/2814); figu...

5 years ago | 0

| accepted

Answered
How to find the point of intersection of two level curves?
The best function for you: https://www.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections

5 years ago | 0

Answered
How to plot sphere in command window
If your data is 2D, use plot plot(x0,yo) If your data is 3D use plot3. plot3(xo,yo,r) ; Note that to use plot command x0,y0...

5 years ago | 0

| accepted

Answered
For loop gives error: Unable to perform assignment because the indices on the left side are not compatible with the size of the right side.
This error occurs, when you try to save more number of elements than you initialized. Example: A = rand(10,5) ; % initialize ...

5 years ago | 0

Answered
Delete all values except the max value
A = [3,10,8 4,8,1] ; [val,id] = max(A,[],2) ; idx = A<val ; A(idx) = 0 ; A

5 years ago | 0

| accepted

Answered
how to get plot with the points increasing with changing color (as points increase their color change from grey to black)
X = repmat((1:5)',1,5) ; Y = rand(5,5) ; plot(X,Y,'.-')

5 years ago | 0

Answered
I need to fill a column data with a specific value
Let data be your m*2 data. x = data(:,1) ; y = data(:,2) ; y0 = y ; % idx = A your indices which should be nan y(idx) ...

5 years ago | 1

| accepted

Answered
Features Classification using deep leaning.
Refer: https://in.mathworks.com/help/deeplearning/ug/create-simple-deep-learning-network-for-classification.html

5 years ago | 0

Answered
Select a random element of a vector and use randi command
A = magic(5) ; A = A(:) ; N = numel(A) ; idx = randi(N,1) ; A(idx) = rand

5 years ago | 0

Answered
How to define these two functions?
syms t alpha f = t^(alpha-1)*exp(-t) ; F = int(f,t,[0 inf])

5 years ago | 0

Answered
Need Help for fprintf
% data = importdata(filename) ; data = [1 10 100 1000 10000 2 20 200 2000 20000 3 30 300 3000 30000] ; ...

5 years ago | 1

| accepted

Answered
showing hours elapsed not date and time data
Let d be your datetime array. d.Format = 'hh:mm:ss'; t = cellstr(d)

5 years ago | 0

Answered
How do I remove all filenames from my cellarray with .m ending, if else how do I save those with .bmp?
idx = contains(filenames,'.bmp') ; filenames(idx)

5 years ago | 0

| accepted

Answered
Horizontal line in plot up to a graph
If you have the xlimits (x0,x1) and the y-value..the required equations is y = k. x = 1:10 ; k = 3 ; y = k*ones(*Size(x)) ; ...

5 years ago | 0

Answered
Summing randomly generated numbers
n1 = 0:0.1:0.9; n2 = 0:0.1:0.9; r1 = n1(randi([1,numel(n1)])); r2 = n2(randi([1,numel(n2)])); thesum = r1+r2

5 years ago | 0

Answered
Array indices must be positive integers or logical values.
function [z]=phi(x) %Determine phi(x) using the formulas provided %2/25/21 %AE 227 a=0.4361836; b=0.1201676; c=0.937298;...

5 years ago | 1

| accepted

Load more