답변 있음
How can I sort data from an excel file and assign ID's to binary classes?
You need not to use a loop. You can go by inequalities, where you will get logical indices as output. The logical indices have 1...

4년 초과 전 | 0

답변 있음
How do I fit a surface to this data properly?
Read this: https://in.mathworks.com/help/curvefit/fit.html

4년 초과 전 | 0

답변 있음
Cannot use "v>=0"?
while rem(v,2)~=0 | v>=0

4년 초과 전 | 0

| 수락됨

답변 있음
How to merge two tables, keeping independent variable (x) the same but summing the dependent variable (y)
T1 = readtable('Confoss_landings.xls') ; T2 = readtable('Mainefoss_landings.xls') ; [idx,ia] = ismember(T2.(1),T1.(1)) ; ...

4년 초과 전 | 0

| 수락됨

답변 있음
How to generate a rhythm in Matlab?
n = 2 ; % number of 0's l = 4 ; % length of array m = l-n ; % number of 1's iwant = [repelem(0,n) repelem(1,m)] ; % ra...

4년 초과 전 | 1

| 수락됨

답변 있음
Make 3d sphere plot from net of sphere
clc; clear all ; I = imread('cameraman.tif') ; [m,n] = size(I) ; [X,Y,Z] = sphere(m-1,n-1) ; surf(X,Y,Z,flipud(I),'...

4년 초과 전 | 0

| 수락됨

답변 있음
how to draw a number of circle inside large circle having same origin but different radius
r = linspace(0,1,10)' ; % Radii th = linspace(0,2*pi) ; C = [0 0] ; % Center x = cos(th) ; y = sin(th) ; X = C(1)...

4년 초과 전 | 2

답변 있음
How to create a new matrix with a for loop?
You should not create individual arrays like that. You should proceed something like this iwant = zeros(3,100) ; iwant(i,:) =...

4년 초과 전 | 0

| 수락됨

답변 있음
find a value between two points
Read about interp1. If you have curve data as (x,y), at the point xi you can seek the value using: yi = interp1(x,y,xi)

4년 초과 전 | 0

답변 있음
Projecting a point along normal direction
You may use this file exchange function: https://in.mathworks.com/matlabcentral/fileexchange/32696-2d-line-curvature-and-normals...

4년 초과 전 | 0

| 수락됨

답변 있음
Correctly plot the quiver on a figure
Try changing (x,y) i.e. use (y,x) instead.

4년 초과 전 | 0

답변 있음
Sort a Matrix by the first column connecting the row elements so that the elements of the second column 'follow' those of the first.
A = rand(10,2) ; [val,idx] = sort(A(:,1)) ; iwant = A(idx,:)

4년 초과 전 | 0

| 수락됨

답변 있음
If same value apperas in array count +1
input = [ 1 2 3 4 1 2 3 4 1 2 3 4 ]; a = reshape(input,[],3)' ; [c,ia,ib] = unique(a,'rows') ; ib

4년 초과 전 | 1

답변 있음
sum different cell arrays based on index
A = { [0,1,0], [1,0,0], [0,0,0], [0,0,0], [0,0,1], [1,1,0], [0,0,0]} ; id = { [1,2,3], [4,5,6] } ; n = length(id) ; iwant...

4년 초과 전 | 0

| 수락됨

답변 있음
Embed vector field in bigger array
Read about padarray. Other option: A = rand(4) ; B = zeros(10) ; B(3:6,3:6) = A

4년 초과 전 | 0

| 수락됨

답변 있음
How to find function for many parameters?
vals = [1, 2,3 6,1,4 7,3,5] ; [m,n] =size(vals) ; B = zeros(4,4,m) ; for i = 1:m B(:,:,i)=fun(A,vals(i,1),vals(i,2...

4년 초과 전 | 1

| 수락됨

답변 있음
How to Copy Upper diagonal elements of matrix A into a new matrix.
You need to proceed like this: for i = 1:m for j = 1:n if i <= j end end end

4년 초과 전 | 0

답변 있음
How to set level values of a variable by comparing(subtracing) two nc files
Your interpolation grid coordinates are completely different comapred to original grid. Read about interp2. ncfile_1 = 'A20150...

4년 초과 전 | 0

| 수락됨

답변 있음
How to match the origins of two different length vectors and pad zeros to match their length?
You must be having (t1,x1) and (t2,x2) ; these are two singlas. You can pick the superset time out of (t1,t2). For the other f...

4년 초과 전 | 0

답변 있음
Error using axis>LocSetLimits (line 325) Vector must have 4, 6, or 8 elements. Error in axis (line 113) LocSetLimits(ax(j),cur_arg,names);
Read about axis. As yours is a 2D plot you need to input four values, which correspond to minx, maxx and miny, maxy. axis([0 b...

4년 초과 전 | 0

| 수락됨

문제를 풀었습니다


The Piggy Bank Problem
Given a cylindrical piggy bank with radius g and height y, return the bank's volume. [ g is first input argument.] Bonus though...

4년 초과 전

답변 있음
I want this two stl files to overlap each other
Do both the stl files have same number of nodal connectivities and nodes? If so you can subtract them. If not you can make your ...

4년 초과 전 | 0

| 수락됨

답변 있음
How select data just out from a polygon, considering a constraint
Read about knnsearch. This will give you indices of points lying closer to the given set of points from a set of points along wi...

4년 초과 전 | 0

답변 있음
How to display image from 2d matrix?
Let A be your matrix. figure imshow(A) figure imagesc(A) figure pcolor(A) ; shading interp; colorbar

4년 초과 전 | 0

| 수락됨

답변 있음
Create a surface from several 1D plots
See to it that all the curves have same dimensions. If not use interp1 and get them into same size. Initliaze matrices X, Y, Z...

4년 초과 전 | 0

답변 있음
Divided a matrix into sub-matrices (MATLAB)
H=zeros(m,n) ; J = 3 ; K = 6 ; H(:,J) = 1 ; H(K,:) = 1 ;

4년 초과 전 | 0

답변 있음
Turning a column to months into number equivalent
Read about findgroups. https://in.mathworks.com/help/matlab/ref/findgroups.html a = {'Apr', 'Jan','Feb', 'Apr', 'Jan'} ; iwant...

4년 초과 전 | 1

| 수락됨

답변 있음
Reducing the size of images by a loop
imgNames = dir('*.png') ; % give your exntenion of images in the folder N = length(imgNames) ; % toal number of images ...

4년 초과 전 | 0

| 수락됨

답변 있음
Find a range in a matrix and rescale it
Let A be your image: A0 = A ; % save for test idx = A >= 120 & A<= 230 ; % get indices of required values val = A(idx) ;...

4년 초과 전 | 1

| 수락됨

답변 있음
How to shift a cell in a matrix by desired number?
Read about circshift.

4년 초과 전 | 1

더 보기