Answered
How to create an animation between 2 points
A = [0 0] ; B = [5 4] ; x = [A(1) B(1)] ; y = [A(2) B(2)] ; p = polyfit(x,y,1) ; xi = linspace(x(1),x(2)) ; y...

5 years ago | 0

| accepted

Answered
Help with plotting an image on 3D
Try image instead of surf. If you use surf, try reversing the y-axis direction.

5 years ago | 0

Answered
is there a matlab visualiser
Read about debugging a code here: https://in.mathworks.com/help/matlab/matlab_prog/debugging-process-and-features.html

5 years ago | 0

Answered
What does xlim() do in my code and why are its brackets empty?
xlim() The above takes the x-values based on the plot/ the input x you give. It will draw a line along x-axes in the range as t...

5 years ago | 0

| accepted

Answered
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 = ...

5 years ago | 0

| accepted

Answered
Interpolating to latitude, longitude and time
Read about interp1 and interp2.

5 years ago | 0

| accepted

Answered
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.

5 years ago | 0

| accepted

Answered
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 =...

5 years ago | 0

Answered
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...

5 years ago | 0

Answered
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 ...

5 years ago | 1

| accepted

Answered
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

5 years ago | 1

| accepted

Answered
turn a sentence into matrix of words
str = 'I Love MATLAB' ; iwant = strsplit(str)

5 years ago | 0

Answered
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...

5 years ago | 0

Answered
index in safe-title
saveas(gcf,[title_t{n},'jpeg'])

5 years ago | 0

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

5 years ago | 0

Answered
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)) ; ...

5 years ago | 0

Answered
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...

5 years ago | 2

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

5 years ago | 0

| accepted

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

5 years ago | 1

Answered
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

5 years ago | 0

Answered
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.... ./

5 years ago | 0

Answered
Remove a string from another string
str1 = 'bio-inspired' ; str2 = 'bioinspired' ; str=setdiff(str1,str2)

5 years ago | 0

| accepted

Answered
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...

5 years ago | 0

| accepted

Answered
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,'-')

5 years ago | 0

| accepted

Answered
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...

5 years ago | 0

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

5 years ago | 0

| accepted

Answered
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...

5 years ago | 0

Answered
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')

5 years ago | 1

| accepted

Answered
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...

5 years ago | 0

| accepted

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

5 years ago | 1

| accepted

Load more