Answered
Index in position 1 exceeds array bounds (must not exceed 1)
i am sure that indexing is right

6 days ago | 0

Answered
Produce equality matrix based on elements in vector.
Try bsxfun % make all combinations using bsxfun C = bsxfun(@minus,b(:),a(:)'); % b - rows, a - columns [i,j] = find(~C);...

6 days ago | 0

Answered
How to sum specific elements in a row of a matrix
try this A = rand(256); srow = 0; for i = 1:16:size(A,1) srow = srow + sum(A(i:i+3,:),1); end

6 days ago | 1

Answered
How to calculate the arterial wall thickness on an image?
You should have some scale parameters Here is idea: human = 45 * 3/100 = 1.35 [m]

6 days ago | 0

Answered
Generate a random orthonormal vector (i) to a given unit vector and (ii) with n-2 predetermined components
What about fsolve b = 1; c = 1; v1 = [-0.52 0.72 -0.19 0.37 -0.18]; v2 = @(x)[x b c 0.45 -0.09]; F = @(x) dot(v1,v2(x)); r...

6 days ago | 0

Answered
Pass out a dependent variable from ode15s without taking the derivative of it
You should calculate rr variable after solving ode45 An example function main [t,u] = ode45(@f,[0.1 3],[1 1]); u1 = u(:,1); ...

6 days ago | 0

| accepted

Answered
PLOT IS NOT SHOWING ANYTHING
Use subplot to draw curvees in separate windows subplot(2,1,1) plot(T,Y(:,1),'r') subplot(2,1,2)] plot(T,Y(:,2),'r')

6 days ago | 0

Answered
fsolve stopped because the problem appears regular
Try this [X,Y] = meshgrid((-6:0)*1e34, (-10:10)*1e34); Z1 = X*0; Z2 = X*0; for i = 1:size(X,1) for j = 1:size(X,2) ...

7 days ago | 0

| accepted

Answered
Move STL object in matlab
Example: the code for selecting pink object fv = stlread(fileName); % extract data v = fv.vertices; ...

7 days ago | 0

Answered
3D effect on bar diagram
YOu can manually plot boxes [X,Y] = meshgrid([0 0 1 1 0]-1/2,[0 0 1 1]-1/2); Z = zeros(size(X)); Z([6 7 10 11]) = 1; surf(...

7 days ago | 1

Answered
how to find the length and width of connected components
Use regionprops If you used bwlabel, can't you just separate? [L,n] = bwlabel(image); data = regionprops(L,'area'); area = c...

7 days ago | 0

Answered
Looping data acqusition process for 100 cycles
Simple example of for loop work for i = 1:5 i end

8 days ago | 1

| accepted

Answered
Filling Rand matrix with specific numbers
Use for loops matrix0=rand(1500,1000); val = [1:-0.25:0]; for i = 1:5 ii = (i-1)*300+1 : i*300; matrix0(ii,:) = val...

8 days ago | 1

| accepted

Answered
loop for a series of changing variable or tables
My solution A1 = table(1,2); A2 = table(1,2); A = {A1 A2}; for i = 1:2 AA = A{i}; new_var(i,1) = AA(5,1); end

8 days ago | 0

| accepted

Answered
Setting nonlcon for fmincon / patternsearch as a matlabfunction
If understood you correctly: you have symbolic expression and wants to convert it to matlab function: syms a b c f = b - a - c...

8 days ago | 0

Answered
Tracing an arc on circumfrence of quarter circle
Solution: I used fsolve to find: RedArea - BlueArea = 0 See script

8 days ago | 0

| accepted

Answered
Solving odes (restricted 3 body problems)
Variables rE and rM should be in the function

8 days ago | 0

| accepted

Answered
creating multiple circles inside an array
Try imdilate I0 = false(1000); % create logical matrix ind = randperm(1000^2,7); % random position to pl...

8 days ago | 0

Answered
How can I use a 'While Loop' to verify user input where it restricts specific inputs?
Correct way to use logical operators iin your case

8 days ago | 0

Answered
how can I plot phase portait of differential equations?
Use meshgrid to create a mesh Use diff to find u and v Use quiver to create vectors Use streamline to create phase portrait ...

9 days ago | 0

Answered
How to convert a spring plotted in plot3 into a mesh
What about torus? You can modify Z coordinate

9 days ago | 1

| accepted

Answered
How can i find out if two minutiae points in a fingerprint image are on the same ridge line?
Simple example I0 = imread('image.jpg'); I1 = ~im2bw(I0); I2 = bwmorph(I1,'thin',inf); I3 = bwareaopen(I2,30); % rem...

9 days ago | 0

| accepted

Answered
Displaying information about the data set by clicking on its plot not working when I run the program more than once
This is a bad idea to find appropriate data better use pdist2 D = pdist(pos(:)',[xdata(:) ydata(:)]); [~,j] = min(D);

9 days ago | 0

Answered
How to find the optical flow of the corner point of a red box in a video?
What about find()? [y,x] = find(redMask,1,'first')

9 days ago | 0

Answered
Solve an ode using ode45
SOlution

9 days ago | 0

Answered
How to locate and exclude values that are above a certain value and next to each other.
Using bwmorph x=[1 2 3 5 3 4 5 6 9 12 15 13 11 9 5 1 2 3 4 2]; x1 = abs(diff(x)); ix = bwmorph(x1>=2,'clean'); % r...

9 days ago | 0

Answered
plotting Matrix vs Scalar
Try this x = [0.1584 0.1086 0.0076 0.0070]; y = -441.67; plot(x,x*0+y)

10 days ago | 0

| accepted

Load more