Answered
How will change the scale value in the figure?
Read about ylim ylim([0 6*10^6])

3 years ago | 0

| accepted

Answered
Make 3 dimensional matrix
[r,c] = size(val); nlay = 10 ; iwant = permute(reshape(val',[c,r/nlay,nlay]),[2,1,3]);

3 years ago | 0

Answered
I wanna make a .mat file
A = rand(10) ; str = 'The above is matrix' ; save test.mat ; % save A, str into mat file load test.mat ; % load the mat file...

3 years ago | 0

Answered
Basic 'for loop' problem: it stops after several iterations
I don't know why you are doing this, but the elow should work. c = zeros(11); for a = 0:0.1:1 b = 10*a + 1; c (1, f...

3 years ago | 0

Answered
Convert table into 2D matrix
REad about table2array

3 years ago | 0

Answered
How can I read my jpeg file in matlab as .mat file
REad about imread. I = imread(myjpeg) ; save data.mat

3 years ago | 0

| accepted

Answered
How to create a chloropleth map using the mean of the shapefiles sub-fields from a raster file?
https://in.mathworks.com/matlabcentral/answers/407463-how-to-subset-the-matrix-array-with-shape-file https://in.mathworks.com/...

3 years ago | 0

Answered
how to Solve the ordinary differential equation (ODE) in matlab? dx/dt=5x−3
syms x(t) eqn = diff(x,t)==5*x-3; s = dsolve(eqn)

3 years ago | 2

Answered
Matlab Array indixing error
In MATLAB the indices should be posittive integers or logicals. If not it will throw the error which you have shown. % EXample ...

3 years ago | 1

| accepted

Answered
How to assign data to dynamic variable
c = 1:10 ; a = cell(length(c),1) ; for i = 1:length(c) a{i} = 2*[1:i] ; end celldisp(a) You can access cell a by...

3 years ago | 1

| accepted

Answered
Check dates if palindrome
t = datetime(2023,3,20) ; t.Format = 'Mddyy' ; if isPalindrome(char(t)) fprintf('%s is a Palindrome\n',char(t)) end ...

3 years ago | 0

Answered
matlab generated.stl file
https://in.mathworks.com/matlabcentral/fileexchange/4512-surf2stl

3 years ago | 0

| accepted

Answered
Partial derivative with respect to x^2
syms x y z f= (x^5*y^3+ z^2*x^2+y*x) / (x^3*y+x*y) dfdx = diff(f,x) dfdx2 = diff(dfdx,x)

3 years ago | 0

Answered
How to to interpolate missing data (two peaks) on 3D graph on MATLAB?
T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1198108/data2.csv') ; data = table2array(T) ; ...

3 years ago | 0

| accepted

Answered
How to find the y from given x on fit line?
Yes very much it is possible. Read about interp1. Also have a look on polyfit and polyval.

3 years ago | 0

Answered
Area plot matlab colors
figure hold on area(array1,'EdgeColor','none','FaceColor','r'); area(array2,'EdgeColor','none','FaceColor','b'); area(arra...

3 years ago | 0

Answered
For loop get an error of "size of the right side is 0-by-1"
peak = B for i = 1:length(B) c = A(B(i,1):C(1,1)) ; if ~isempty(c) peak(i,1) = max(c); end end

3 years ago | 0

| accepted

Answered
I want to plot selected data from rows and columns
T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1186758/SN_m_tot_V2.0.txt') ; scatter3(T.(1),T.(2)...

3 years ago | 0

Answered
how to import data from csv and plot?
T=readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1186578/baseline.csv'); X=T.(1); Y=T.(2); plot(Y)

3 years ago | 1

Answered
I am trying to open multiple folders which have about 500 files under them and then use function vtkread to read the files in those folders. I am not sure how to set that up.
thepath = ' '; % give your path thedirs = dir(thepath) ; thedirs(1:2) = [] ; % remove . and .. Z = cell([],1) ; % initaal...

3 years ago | 0

| accepted

Answered
How can i plot the projection of 3d on 2d?
X=1:1:100; Y=1:1:100; Z=1:1:100; figure hold on scatter3(X,Y,Z,[],Z,'filled') scatter(X,Y,[],Z,'filled') view(3)

3 years ago | 0

Answered
How do I replace -1.0000e+30 with NaN?
Let T be your array. tol = -10^10 ; % fix this to satisfied value T(T<tol) = NaN ;

3 years ago | 0

| accepted

Answered
Replacing part of an array with another
A = rand(4) ; B = rand(4) ; n = size(A,1); A(1:(n+1):end) = diag(B) ; % repalce diagonal elements of A with diagonal elemen...

3 years ago | 1

| accepted

Answered
Getting following error while making Contourf plot [ Error using contourf Z must be at least a 2x2 matrix]
T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1185378/Book1.xlsx') ; x = T.(1) ; y = T.(2) ; z...

3 years ago | 0

| accepted

Answered
Plotting simple functions bounded by inequalities
m=-0.08; j=linspace(min(Ts_),max(Ts_),100); alpha_variable = m*j ; alpha_variable(j<-10) = 0.7 ; alpha_variable(j>10) = 0....

3 years ago | 0

Answered
Plotting complementary error function with 2 variables
T0 = 100; T1 = 70; c = 1; x = linspace(-1,1) ; % define your range t = linspace(0,10) ; % define your range [x,t] = m...

3 years ago | 0

Answered
Somebody help me for my exercise please.
This is how you have to proceed. U=200; %velocity gamma=1000; %circulation Q=14; ...

3 years ago | 0

| accepted

Answered
Finding the gradient and the hessian of the same function
Read about gradient, hessian.

3 years ago | 0

| accepted

Answered
How can I get the 3 minimum values of this plot?
REad about min. You have saved rmse of train, validatioon and testing. Use the function min and get the index. I would say check...

3 years ago | 0

| accepted

Load more