Answered
How to down sample an imported txt file in MATLAB
filename = 'as appropriate'; YourTable = readtable(filename); NewTable = YourTable(1:20:height(YourTable), :);

4 years ago | 0

Answered
Is there any function with same function as strel, but where I can define a center of shape not only the radius
No such function is provided. You will need to use strel() and then pad the array or crop the array as appropriate. Note t...

4 years ago | 0

| accepted

Answered
Calculate the total number of points/nodes in a .FIG file
fig = openfig(filename); objs = findobj(fig, 'XData'); xcell = get(objs, 'XData'); xels = cellfun(@numel, xcell); ...

4 years ago | 0

Answered
How to connect Mark-10 Series7 digital force gauge with Matlab, and can read data and generate data trend.
According to the specifications, the Mark-10 Series 7 has a USB/RS-232 connector. You would connect it to a USB port on your MAT...

4 years ago | 0

Answered
I am working on code and it works when I load up MATLAB, but when I add code the previous code that works no longer does.
it works until i add the last part with the geodensity plots. Once I add them, the error message says that there was an error ru...

4 years ago | 1

Answered
Objective function is undefined at initial point. Fmincon cannot continue.
ti becomes SCO_min and DT becomes SCO_MAX in the function. The function computes max minus min and divides by that. Which is a p...

4 years ago | 0

Answered
Error: File: Parallelanalysis.m Line: 60 Column: 1 This statement is not inside any function.
end % end time loop What time loop? You are not inside any loop there. The parfor already ended.

4 years ago | 0

Answered
Identify the position (row and column) in matrix for negative value
distance = [41.2709 37.8647 34.0537 30.0337 26.0375 22.3220 19.1442 13.9726 13.9401 13.9881 14.0218 14.0278;...

4 years ago | 0

Answered
How to make the right output
q = vector((end-(shift - 1)):end); That requires that vector is a function, or else that vector is available within scope. But ...

4 years ago | 0

Answered
Creating horizontal regions between functions
Consider the top red line that you want. The x coordinates of the line should start from 0, but should end at the point where co...

4 years ago | 0

Answered
Finding the minimizer using fminunc.
If you need to find a maximum rather than a minimum then construct nfv = @(x) -fv(x) now minimize nfv using fminunc. If you n...

4 years ago | 0

Answered
i want to know ho plot the following intervals
You can form the convolution integral. A function that turns on (with value 1) at time 0 and turns off (value 0) at time T is ...

4 years ago | 0

Answered
How to change image size from 224 x 224 x 1 to 224 x 224 x 3
I recommend that you consider using an imageDatastore followed by an augmentedImageDatastore -- the augmented store can automati...

4 years ago | 0

Answered
Stateflow flow logic questions
Okay, suppose you start and at time 0, x is (say) 25. So y should jump to 3000 (because of the "from 3000" requirement), and the...

4 years ago | 1

Answered
Particle filter error solution
My guess is that you are using the particle_filter function from https://www.mathworks.com/matlabcentral/fileexchange/35468-part...

4 years ago | 1

Answered
How process all images in one Time
You cannot process all of the images at the same time. imread() is not able to read more than one file at a time. You can read ...

4 years ago | 0

Answered
Ho can i imread all images in the Path
img_path1 = 'C:\Users\hp\Desktop\New folder (4)\boss_256_0.4\cover'; dinfo = dir( fullfile(img_path1, '*.png') ); filenames ...

4 years ago | 0

| accepted

Answered
Is there a way to use a loop to generate outputs for a section of data (like rows 1 through 206) and then moving on to doing the same for subsequent rows within the same loop?
Try findgroups and splitapply If you are certain that the identifiers in column 1 are always positive integers starting from 1...

4 years ago | 1

Answered
How to identify if a string has a pattern ?
setStrings{1} = '2*x + 3'; setStrings{2} = '2*exp(-3/x)'; setStrings{3} = '-2*x - 3'; setStrings{4} = '-2*exp(3/x)'; setStri...

4 years ago | 0

| accepted

Answered
How to read the third line of a .txt file starting in the middle of the line?
You cannot start reading in the middle of a line (except in the case that you happen to know exactly how many bytes it is from t...

4 years ago | 1

| accepted

Answered
Function for ODE45 requires all coefficients be written in it
See http://www.mathworks.com/help/matlab/math/parameterizing-functions.html on how to create anonymous functions that include th...

4 years ago | 1

Answered
How do I change line thickness and color on a video
img(517:517+LineWidth-1, :, :, :) = 0; to change the width of the line (while still leaving it black) You are doing 4 dimensio...

4 years ago | 0

| accepted

Answered
Change date InputFormat across a cell
You do not have a cell array of datetime objects: you have a cell array of tables, and you need to affect one particular variabl...

4 years ago | 1

Answered
Too many Input arguments error
You are obviously looking for a specific value in s, since you use it as a bound for fplot. I suspect that you are wanting to us...

4 years ago | 0

Answered
How to vectorize ?
output = 1*(a>=520) + 2*(a<=500) + 3*(a>500 & a<520) Note: output will be 0 for any location that fails all three tests. For f...

4 years ago | 1

Answered
Symbolic matrix in MATLAB
If your MATLAB does not have the Symbolic Toolbox at all, then you are out of luck (unless you get a license for Maple and insta...

4 years ago | 0

Answered
when doing A(B)=C, get average C values if index is used >1 times
See findgroups and splitapply Caution: if you are using a function that operates along the first non-singular dimension, such a...

4 years ago | 0

| accepted

Answered
Size of vector of abstract symbolic functions
When you have an expression involving two symfun, then the processing by the symbolic toolbox first checks to be sure that the s...

4 years ago | 0

| accepted

Answered
Curve fitting toolbox can return bogus results for 2 term exponential functions. Is this a bug?
Sum of exponentials is notoriously difficult to fit. One of the problems is that you did not put bounds on your variables. Whe...

4 years ago | 0

| accepted

Load more