답변 있음
how to solve the error'The grid must be created from grid vectors which are strictly monotonically increasing'.
You code needs lot of changes. This line: [X1,Y1]=meshgrid(lon(1):0.5:lon(end),lat(1):0.5:lat(end)); should be replaced with...

4년 초과 전 | 0

답변 있음
How can I remove the error " Not enough input arguments" of nlinfit?
Replace your modelfunction with: modelfun = @(x,b)(b(1)*(x-1)).^(k-1) + b(2)*(x-1).^(k-2)+b(3)*(x-1)+b(4);

4년 초과 전 | 0

답변 있음
x0=(1, 1, … , 1(5000), 0, 0, … ) , how we can input this value in matlab
Read about repmat, repelem, linspace and : operator

4년 초과 전 | 0

| 수락됨

답변 있음
Interpolation is wrong?
x=dep_cal2012; % 977x1 y=wc_average; % 78x1 ix = linspace(1, numel(y), numel(x)); WC_interp = interp1(1:numel(y), y,ix,'ne...

4년 초과 전 | 0

답변 있음
Adding zeros in the empty places in a matrix.
A = rand(252,1) ; iwant = zeros(252,1) ; idx = [1 13 25 73 121 109 97 61] ; iwant(idx) = A(idx) ;

4년 초과 전 | 0

| 수락됨

답변 있음
Index exceeds the number of array elements
Replace the while loop condition: while 1 with while i<=length(suma) It eill not give the error..but still I am surprised wh...

4년 초과 전 | 0

답변 있음
Error using reshape : number of elements must not change.
Read the documentation of reshape. The error is clear, you are trying to ressape an array with m*n elements to an array greater ...

4년 초과 전 | 0

| 수락됨

답변 있음
How to remove rows from structure based on value condition of field?
rawMeasurements.Area(rawMeasurements.Area<10) = []

4년 초과 전 | 0

답변 있음
Read an ascii file with header and some character
fid = fopen('test.txt') ; % 1| 569140.81 |3740536.75| 0.5548803| S = textscan(fid,'< %d| %f | %f | %f |\n','Delimiter',...

4년 초과 전 | 0

| 수락됨

답변 있음
Assign double array to cell array
A = rand(3) B = mat2cell(A,size(A,1),ones(1,size(A,2)))

4년 초과 전 | 0

답변 있음
how to make heatmap smooth?
D1 = -4.71 ; D2 = -3.14 ; Theta_Theory = linspace(D2, D1, 1000); Velocity_Theory = linspace(-100,0,1000); ...

4년 초과 전 | 0

| 수락됨

답변 있음
How to crate datastore for .mat file dataset?
Read here an example is given: https://in.mathworks.com/help/matlab/ref/matlab.io.datastore.filedatastore.html#mw_1ef829ea-2656-...

4년 초과 전 | 0

답변 있음
Plotting a matrix of line plots
x1 = rand ; y1 = rand; x2 = rand ; y2 = rand ; x3 = rand ; y3 = rand ; [X,Y] = meshgrid([x1 y1 x2 y2 x3 y3]) ;

4년 초과 전 | 0

답변 있음
Raster reference object to Reference matrix
[A,R] = readgeoraster('myfile.tif'); mapshow(A,R) x = linspace(R.XWorldLimits(1),R.XWorldLimits(2),R.RasterSize(1)); y = li...

4년 초과 전 | 0

답변 있음
How to delete all rows of a matrix wherever any value is invalid (999)?
idx = any(M==999,2) ; M(idx,:) = [] ;

4년 초과 전 | 0

답변 있음
fprintf for 3D matrix
A = rand(3,3,3) ; C = permute(A,[1 3 2]); C = reshape(C,[],size(A,2),1) ; fid = fopen('test.txt','w') ; fmt = [repmat('...

4년 초과 전 | 1

| 수락됨

답변 있음
how to take every row in matrix?
iwant = A(2:2:end,:) ;

4년 초과 전 | 0

답변 있음
Hamming distance between columns of two matrices
HamDist = pdist2(A',B','hamming'); HamDist = HamDist' ; [~,ind] = min(HamDist,[],2);

4년 초과 전 | 0

답변 있음
How to count pixel which are coming on the edge of the polygon?
Your data from .mat file already has lot of NaN values. Thee is no data in the mat file. Check your data. The same code for s...

4년 초과 전 | 0

답변 있음
How to project a line on a surface?
Let X, Y, Z be your surface data. And (x,y) be the coordinates of the line data. Use interpolation to get the z values of line f...

4년 초과 전 | 0

답변 있음
.csv file hex to dec converting(hex2dec is not working)
You cannot convert like that. Read the csv file data using csvread or readtable. Then on the data use the function hex2dec Th...

4년 초과 전 | 0

답변 있음
how to keep updating the value of average in every iteration.
a=1; b=1;c=1; z=0;n=1; x=0; zzz(n,:)=[z a b c ]; n=n+1; average = zeros(6,3) ; averageMatrix = zeros(6,4) ; for i=1:6 ...

4년 초과 전 | 0

답변 있음
Question about a:h:b
a=1; h=1; b=5 ; l = a:h:b m = b:-h:a

4년 초과 전 | 0

| 수락됨

답변 있음
Generating a continuous function from discrete data
Read about interp1. You can interpolate your data.

4년 초과 전 | 1

답변 있음
Error while reading image in loop to perform some operation on all images in folder
function recursiveFile() Files=dir('D:\datasets\PRImA_LayoutAnalysisDataset\PRImA Layout Analysis Dataset\Images\*.tif'); fo...

4년 초과 전 | 0

| 수락됨

답변 있음
How to use the 2D array point in command window for calculating the total distance covered by the path
p = [2.0000 2.0000 2.1271 1.7164 4.3358 7.0825 7.3546 8.8141 10.7270 11.0068 11.0000 11.0...

4년 초과 전 | 1

| 수락됨

답변 있음
How to plot by using result data?
How about using quiver? quiver(position_x,position_y,velocity_x,velocity_y)

4년 초과 전 | 0

답변 있음
How to trim down data in an array
a = 1; b = 200; A = (b-a).*rand(1000,1) + a; x1 = 1:length(A) ; x2 = linspace(1,length(A),100) ; Anew = interp1(x1,A,x2) ...

4년 초과 전 | 0

답변 있음
Split an array based on defining a limit for the first value (left edge)
You check the initial time value and final time value of the array. If they are not like what you wanted, you can do interpolati...

4년 초과 전 | 0

답변 있음
Divide transfer function get "Model I/O dimensions must agree." Please help
May be you can run a loop for each tf.. for i = 1:7 Gc_a(i) = (Gc(i)*Gp(i))/(1+(Gc(i)*Gp(i))); %y/SP end

4년 초과 전 | 0

더 보기