How do I limit plotting the values from a row variable say time?
Z = peaks(30) ; x = datetime(2022,01,01):datetime(2022,01,30) ; % datetime class y = 1:30 ; pcolor(x,y,Z) shading flat

5 Tage ago | 0

Why do certain images require imshow(imagename,[]). whereas others don't?
You check the class of A, B. A=imread('cameraman.tif'); PSF = fspecial('gaussian',[5,5],2); h=fspecial('motion', 10, 45); B...

5 Tage ago | 1

Split .nc file into multiple .nc files
@anjula marasinghe, @Jake_K There is no necessity to split the single ncfile into multiple ncfiles for each time step. It is wa...

6 Tage ago | 0

How can I recode certain values in one vector based on those in another?
Vector1 = [29, 59, 94, 133, 169, 207, 243, 281, 317, 356, 392, 431, 469, 505, 543]'; Vector2 = [44, 74, 120, 148, 184, 227, 269...

8 Tage ago | 0

| accepted

Different colors in Histogram (MATLAB)
Iter=[30 55 64 130 186 432]; SNR=[9 8 8 9.3 6 6.7]; color = {'r','b','g','y','m','k'} ; figure hold on for i = 1:length(It...

9 Tage ago | 1

| accepted

How to define two dimension longitude, latitude and variable for saving data in netcdf format?
lon=rand(406,271); lat=rand(406,271); var=rand(406,271); [nx,ny] = size(lon) ; % nc filename to be written file = 'myfile....

9 Tage ago | 0

Ho to find the interception
The best you can use is: https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections

9 Tage ago | 1

how to make colormap and color bar from ansys to like out in matlab
Try the below after pcolor. cmap = jet(10) ; colormap(cmap) caxis([85 100]) % mention your limits

9 Tage ago | 0

Reduce edgewidth in trisurf plot
x = rand(100,1) ; y = rand(100,1) ; dt = delaunayTriangulation(x,y) ; t = dt.ConnectivityList ; p = dt.Points ; d = sqr...

9 Tage ago | 0

| accepted

Delete rows in a string array, if they just contain zeros
I hope, your data is in a file. T = readtable(myfile) ; T(T.(2)==0,:) = [] ;

9 Tage ago | 0

how to remove values below 0.1?
If P is your array if size 1x27331. P(P<0.1) = NaN ;

9 Tage ago | 0

| accepted

comma insertion in array
A = [1 2 3] ; dlmwrite('test.txt',A)

9 Tage ago | 0

How to fill polygons based on attribute values?
How about this? shpFile = 'Expot.shp' ; S = shaperead(shpFile) ; N = length(S) ; cmap = jet(N) ; figure hold on for...

9 Tage ago | 0

| accepted

How can I output only part of a array?
FileName = ['114_1688','.jpg'] ; saveas(gcf,FileName)

10 Tage ago | 0

how to give value stress from excel give color in my mesh
You can coonsider using this package: https://in.mathworks.com/matlabcentral/fileexchange/32719-postprocessing-in-fem

10 Tage ago | 0

| accepted

How to generate series by percentage difference using loop?
A = zeros([],1) ; A(1) = 60 ; dA = 1 ; i = 1 ; while dA > 0.01 i = i+1 ; A(i) = A(i-1)*0.99 ; dA = abs(A(...

10 Tage ago | 0

| accepted

How to make the following code valid for tables not only matrices
Convert the Table into array using table2array. You can extract any column from table T using T.(1), T.(2) etc....

10 Tage ago | 0

Can anyone please help me ? I am not able to find the a value y from x
Did you initialize AZ_L? If not initialize it as AZ_L = zeros(3,1) ;

10 Tage ago | 0

| accepted

My code is about finding head value using bisection or false error method .But its showing parse error for xl=input("the lower value");i don't know how to solve it...
You have to either copy the function below the main code or copy the function into a different mfile and then run the main code....

10 Tage ago | 1

Plot last point of column

10 Tage ago | 0

Dot Product of Rows in array
iwant = sum(A.*B,2) ;

11 Tage ago | 0

Unable to perform assignment because the size of the left side is 111-by-1 and the size of the right side is 112-by-1.
The error is siimple, you are trying to save more number of elements than the array is initialized for. A = zeros(2,3) ; % ...

11 Tage ago | 1

| accepted

3D plotting of given parametric equations
m = 50 ; n = 50 ; p = 5 ; u = linspace(0,pi,m) ; v = linspace(0,2*pi,n) ; r = linspace(25,75,p) ; [U,V,R] = meshgrid(u,v,r...

11 Tage ago | 0

| accepted

12 Tage ago | 0

how to count how many time rows of an matrix apear in other matrix
Read about ismember A = [1 1 3; 1 2 7; 1 3 5]; B = [1 1 3; 2 1 4; 1 3 5; 2 4 5]; [c,ia] = ismemb...

12 Tage ago | 0

| accepted