回答済み
Which function should I use to fill an ouput matrix based on information in two other matrices
Index = [1 2 1; 5 4 4]; Data = [12 16 10; 13 16 18; 12 11 14; 18 19 22; 23 60 17] ; Output = [12 13 12; 60 19 19] ; iwant = ...

9日 前 | 0

| 採用済み

回答済み
Interpolating to latitude, longitude and time
Read about interp1 and interp2.

9日 前 | 0

| 採用済み

回答済み
Check if point lies inside error ellipse
REad about inpolygon. This will tell you whether given set of points lies inside the given closed polygon.

9日 前 | 0

| 採用済み

回答済み
Continuous Wavelet 2D Plot Help.
Let A be your data matrix. %% Structured grid x = A(:,1) ; y = A(:,2) ; z = A(:,3) ; nx = length(unique(x)) ; ny =...

9日 前 | 0

回答済み
How to do spatial correlation
As the data B is at a location......Pick the same location data from the grid 20x25 and then find the corelation. Read about plo...

9日 前 | 0

回答済み
How to split 1 matrix into 3 parts
m = 9; % number of rows (should be multiple of 3) n = 10 ; % number of columns p = 3 ; % three parts wanted % Range of ...

9日 前 | 1

| 採用済み

回答済み
Delete NaN in arrays in a cell
Let C be your cell array; iwant = C ; for i = 1:length(C) idx = isnan(C{i}) ; iwant{i} = C{i}(~idx) ; end

10日 前 | 1

| 採用済み

回答済み
turn a sentence into matrix of words
str = 'I Love MATLAB' ; iwant = strsplit(str)

10日 前 | 0

回答済み
MATLAB: Index exceeds the number of array elements (1)
You are trying to extract more number of elements then present in the array. Example: A = rand(1,3) ; A(1) % no error A...

10日 前 | 0

回答済み
index in safe-title
saveas(gcf,[title_t{n},'jpeg'])

10日 前 | 0

回答済み
Concatenate 3-D matrix in a for loop
A = rand(2,3,4) ; B = rand(2,3,4) ; C = cat(1,A,B)

10日 前 | 0

回答済み
How to replace elements in a table using loops or any other method ?
C1 = {'Y' 'Y' 'N' 'Y' 'N'}' ; C2 = rand(size(C1)) ; T = table(C1,C2) ; % replace Y a 1 and N as 0 C = zeros(size(C1)) ; ...

10日 前 | 0

回答済み
count of points in particular region from graph
You can proceed like below demo example: clc; clear all ; a = 1; b = 10 ; x = (b-a).*rand(1000,1) + a; y = (b-a).*rand(1...

10日 前 | 0

回答済み
Have index of numbers and letters in title
It should be: t{n} = 'abc123abc';

10日 前 | 0

| 採用済み

回答済み
How to make operation row by row
Use: FtempN =(1 + Alpha_pmp.* (AirTemp(1)-Tstc)) ;

10日 前 | 1

回答済み
How do I replicate curve fit figure with an equation?
You can use plot to plot the plane you want. Refer here: https://in.mathworks.com/help/curvefit/fit.html

10日 前 | 0

回答済み
exponential function remove the error of division
X1=30; Y1=20; X = 0:150; Y = Y1*exp(30./(X.^0.5)); plot(X,Y) Use element by element division.... ./

10日 前 | 0

回答済み
Remove a string from another string
str1 = 'bio-inspired' ; str2 = 'bioinspired' ; str=setdiff(str1,str2)

10日 前 | 0

| 採用済み

回答済み
Unable to perform assignment because the size of the left side is 8-by-1 and the size of the right side is 8-by-1001.
The error is clear, you are trying to save more number of elements in the initilaized matrix. Example: A = zeros(3,3) ; % i...

10日 前 | 0

| 採用済み

回答済み
How to set x > 0, at 2nd order polynomial using polyfit.
idx = x > 0 ; x = x(idx); y = y(idx) ; p2 = polyfit(x,y,2); f = polyval(p2,x); plot(x,f,'-')

10日 前 | 0

| 採用済み

回答済み
How to do one grouped graph showing months
t = datetime(2020,1,1):datetime(2020,12,31) ; y = rand(size(t)) ; % make required dates to plot jan_t = datetime(2020,1,[1...

10日 前 | 0

回答済み
Plot error: Index exceeds the number of array elements (104).
plot(Ini_x,history(end).U_Euler(1,:))

10日 前 | 0

| 採用済み

回答済み
How to plot data only certain days of a year.
You may proceed something like below: t = datetime(2020,1,1):datetime(2020,12,31) ; y = rand(size(t)) ; % random y-axis value...

10日 前 | 0

回答済み
How plot slope from lower point on image to last point .When I apply my code ,its not draw to end point in image
I = imread('image.png') ; [m,n,p] = size(I) ; imshow(I) ; hold on plot([1 m],[n 1],'b')

11日 前 | 1

| 採用済み

回答済み
Conditional matrix arrangement in output
x=[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15]; a=1; b=2; c=3; z = zeros(3,1) ; idx = x(:,1)<3 ; z(idx) = x(idx,2...

11日 前 | 0

| 採用済み

回答済み
How do i add a title and color bar
pause(.01); hold on grid off pcolor(Hz) title('PEC Boundary Condtion') colorbar; hold off ...

11日 前 | 1

| 採用済み

回答済み
Editing Legend/Plotting
Try: Mat_w = -.5:.5:.5; u = s\f; title('Case 2') hold on plot(Mat_w, u) xlim([-w,w]) legend('N=5','N=9', 'N=20');

11日 前 | 0

回答済み
Unrecognized function or variable 'X'.
fun = @(x,y) exp(-2*x.^4+2*x.^2-x.*y.^1-y.^2) ; fsurf(fun)

11日 前 | 0

| 採用済み

回答済み
reshaping data properly mesh grid
Let X be your data matrix of size 2000*4. h = X(:,2) ; w = X(:,3) ; nh = length(unique(h)) ; nw = length(unique(w)) ; h ...

11日 前 | 1

| 採用済み

回答済み
how to Search the documentation to create a 5-by-7 matrix with normally distributed numbers (instead of uniformly distributed numbers).
Read about randn. https://in.mathworks.com/help/matlab/ref/randn.html

11日 前 | 0

| 採用済み

Load more