Réponse apportée
Plotting Inequalities in Matlab
x = -10:0.1:10 ; y = -10:0.1:10 ; [X,Y] = meshgrid(x,y); ineq = (X > 0) & (Y > 5./X) & (Y > (X.^(2)-25)./(5*X)); h = pcolo...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
a single line of code that will take complex variables x and y and define a variable z as the phase of the product of x and y.
x = rand+1i*rand ; y = rand+1i*rand ; p = x*y ; iwant = atan(imag(p)/real(p))

plus de 3 ans il y a | 0

Réponse apportée
How to plot surf for 3D images.
dicom will be a 3D matrix..you cannot use surf straight away. h = dicomread('h.dcm'); [m,n,p] = size(h) ; figure hold on f...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How to shift the graph?
Read about montage

plus de 3 ans il y a | 0

Réponse apportée
How to adjust plot?
Don't use: plot(t(45/dt:end),V(45/dt:end-1), 'LineWidth', 2) instead use: plot(t,V, 'LineWidth', 2) Like this: clear all; c...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How to draw three circles with centers and radii given?
x1=2; y1=8; r1=10; x2=5; y2=5; r2=12; x3=4; y3=9; r3=9; th = linspace(0,2*pi) ; x = cos(th) ; y = sin(th) ; figure ...

plus de 3 ans il y a | 1

Réponse apportée
How to convert cell to logical?
You can use ismember. Let L be your categorical data of size 128*128*64. I see that, there are two data background, tumour. You ...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Divide training , validation and testing data.
A = rand(2000,3) ; % your data Test = A(1501:end,:) ; % take test continuously A = A(1:1500,:) ; % pick the left dat...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
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

plus de 3 ans il y a | 0

Réponse apportée
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...

plus de 3 ans il y a | 1

Réponse apportée
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...

plus de 3 ans il y a | 0

Réponse apportée
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...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
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....

plus de 3 ans il y a | 0

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

plus de 3 ans il y a | 1

Réponse apportée
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

plus de 3 ans il y a | 0

Réponse apportée
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...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
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,:) = [] ;

plus de 3 ans il y a | 0

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

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How to plot these two plots in a single figure and using both y axis?
Read about yyaxis

plus de 3 ans il y a | 0

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

plus de 3 ans il y a | 0

Réponse apportée
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...

plus de 3 ans il y a | 0

| A accepté

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

plus de 3 ans il y a | 0

Réponse apportée
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

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
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(...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
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....

plus de 3 ans il y a | 0

Réponse apportée
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) ;

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
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....

plus de 3 ans il y a | 1

Charger plus