Answered
How to get bounding boxes around rectangular rooms which are rotated by some angle ?
You can find the required pixel values anf get the points. Check below: I = imread("image.jpeg") ; [y,x] = find(I~=255) ; i...

6 years ago | 0

Answered
How to use "fsolve" to solve nonlinear simultaneous equations
syms x1 x2 eqns = [x1^2-1==0, x1*x2-3==0] ; sol = solve(eqns,[x1, x2])

6 years ago | 0

Answered
Correcting a 'Parse Error'
A variable name cannot start with a number.... 1a = 3 % not allowed a1 = 3 % allowed So rename 1SSR to SSR1, 1R2 to R21.

6 years ago | 0

Answered
How to sketch doamin of f(x,y)=√(y)+√(25-x^2-y^2)?
Define the values of x and y. For this read about linspace. Read about element by element operations. Read about anonmous fun...

6 years ago | 0

Answered
Why did I get different results by using degree/radiance as the unit in the integration?
Note that both the results are same...but they are in different units.... Your Q1 is in degrees and Q2 is in radians.....Conver...

6 years ago | 0

| accepted

Answered
Adding NaN values in a for loop
May be your should add if isempty(y1) y1 = NaN; end

6 years ago | 1

| accepted

Answered
How to find general solution of second order differential equation
syms y(t) ode=diff(diff(y(t),t))+0.2*diff(y(t),t)==sin(2*pi*t) ; sol = dsolve(ode)

6 years ago | 0

Answered
How can I create two rectangles with the same shape, one stay at specific position that created by using matrix, and the other change its position from 0 to 90 degree?
%% Main Code % Initialise the graph hSquare = plot (NaN, NaN , '-b'); %Open empty graph. NaN - Not a number. axis([-10 10 -10...

6 years ago | 0

| accepted

Answered
quiver3 in a loop
There is a typo error ..you have used vvhat(ii:3) instead of vvhat(ii,3) for ii = 1:length(bbhat); quiver3(bbhat(ii,1),bbhat(i...

6 years ago | 0

| accepted

Answered
change columns in array to zeros and assign to another vector
n = 10 ; A = rand(n,3) ; % matrix for demo A(:,1:2) = 0 ; % make first two columns zero B = A ; % assign tp B

6 years ago | 0

| accepted

Answered
Merge 2 text file in same row / same line
File = {'a1.txt', 'aa1.txt'}; N = length(File); for i = 1:N fid = fopen(File{i},'rt') ; C = textscan(fid,'...

6 years ago | 0

Answered
MATLAB sum of pixel between 0 and 100 intensity
If I is your image. idx = I >= 0 & I <= 100 ; % this gives logical indices of the pixels present N1 = nnz(idx(:)) ; % t...

6 years ago | 0

Answered
how can i model a structure of nasa almond?
You can use this package: https://in.mathworks.com/matlabcentral/fileexchange/25555-mesh2d-delaunay-based-unstructured-mesh-gene...

6 years ago | 0

Answered
How to divide a curve into 8 equal region along x axis?
A = rand(1,100) ; a = length(A) ; n = 8 ; % check whether data needed to be appended to reshape into n b = n * ceil(a / ...

6 years ago | 0

| accepted

Answered
Calculate the area of 1 layer of point cloud data
Use boundary and get the coordinates/ points which define your region and use polyarea.

6 years ago | 0

Answered
Split a specific matrix in 4 equal parts
M = rand(8) ; [m,n] =size(M) ; A = M(1:n/2,1:n/2) ; B = M(1:n/2,n/2+1:end) ; C = M(n/2+1:end,1:n/2) ; D = M(n/2+1:end,...

6 years ago | 0

| accepted

Answered
Plot3 with different colors depending on the value of Z
Let (x,y,z) be your m*3 data. Two options: If data is structured x = unique(x) ; nx = length(x) ; y = unique(y) ; ny = len...

6 years ago | 0

| accepted

Answered
matrix, cell array, and table
Can 'matrix' have non-numerical data? No matrix cannot have a non-numerical data. Eleemnts are accessed by matrix(i,j) What is...

6 years ago | 0

| accepted

Answered
Find first row/column with at least one finite element
clc; clear all ; % demo data A = NaN(100) ; A(25:75,25:75) = rand(51) ; % Get non=nan's index idx = ~isnan(A) ; % Mak...

6 years ago | 0

| accepted

Answered
How to run DINEOF in MATLAB ?
http://modb.oce.ulg.ac.be/mediawiki/index.php/DINEOF https://svn.oss.deltares.nl/repos/openearthtools/trunk/matlab/applicatio...

6 years ago | 1

Answered
Use of @ in matlab code
@ does not have any value...it is a way to reperesent anonymous functions. Read about anonymous functions in matlab. https://i...

6 years ago | 0

Answered
Use ginput to crop an image
You need to define Rect to use the ginput points. I = imread("image.jpeg") ; imshow(I) ; [Px,Py] = ginput(2) ; Px = ro...

6 years ago | 0

| accepted

Answered
How to extract rows from a table based on the categories present in one of the columns?
b=Plate(strcmp(Plate.Invivo,'Drug'),:);

6 years ago | 0

Answered
Comparing two arrays of different length with time values (ode45 vs. RK4)
Read about intepr1. Get both the curves to the same timestamp/ same step size/ same dimension and compare.

6 years ago | 0

| accepted

Answered
To find out discontinuity (break) in an image
You can get the points of that curve as below: I = imread("image.jpeg") ; [y,x] = find(I==0) ; x = x'; y = y' ; % arrang...

6 years ago | 0

Answered
vector3d random sample
n = 13717 ; % totalpoints m = 1000 ; % points to select x = rand(n,1) ; y = rand(n,1) ; % random data for demo idx = ra...

6 years ago | 0

Answered
Solve the differential equation
syms x y(x) ode = diff(y,x)+(x+2*x)^3/(y+2*y)^3==0 ; sol = dsolve(ode) ; celldisp(sol)

6 years ago | 1

Answered
how to find the pixel that drop from 0-100
idx = a >= 0 & a <=100 ; iwant = nnz(idx(:)) ;

6 years ago | 0

| accepted

Answered
Reading 3-dimensional netcdf data
You can read your nc file like shown below....Change the variables in the below to your variables naming converntion in your fil...

6 years ago | 3

| accepted

Load more