Answered
How to plot multiple 2D matrix data with different color on the same figure?
I = rand(100,100,10) ; [m,n,p] = size(I) ; [Y,Z] = meshgrid(1:n,1:n) ; X = ones(m,n) ; figure hold on for i = 1:p s...

6 dagar ago | 1

Answered
how to merge two NetCDF4 files into one
file1 = 'tropomi1.nc' ; file2 = 'tropomi2.nc' ; x1 = ncread(file1,'/PRODUCT/longitude'); y1 = ncread(file1,'/PRODUCT/latitu...

6 dagar ago | 1

| accepted

Answered
Running an inner loop multiple times.
You may proceed something like shown. Check your code and values once, t is coming as inf. This should give you some idea. numb...

6 dagar ago | 0

| accepted

Answered
Finding a specific value after analysing the trend of different plots
Read about interp1. You can use this to extract the values you want. Let (x,y) be your data and you want yi for xi: yi = inte...

6 dagar ago | 0

Answered
how to animate Plot
This should help you: https://in.mathworks.com/matlabcentral/answers/94495-how-can-i-create-animated-gif-images-in-matlab

6 dagar ago | 0

Answered
How to import data from a txt file that has 256 arrays and 128 data points per array into a 128x256 matrix?
filename = 'SeqLoop.data.kSpaceOS.txt' ; fid = fopen(filename,'r') ; S = textscan(fid,'%s','delimiter','\n') ; fclose(fid)...

6 dagar ago | 1

| accepted

Answered
I need to create matrix without using loops
Read about the function diff, gradient.

7 dagar ago | 0

Answered
I have noisy image matrix.I need to plot it on line plot.How do I do it?
You can convert image into column using (:). But I don't think this is the way to check. I = imread('cameraman.tif') ; plot(...

8 dagar ago | 0

Answered
Creating Surface Plot from a Matrix with 3 Columns
x = speed ; y = Torque ; z = bsfc ; %%structured xi = unique(x) ; yi = unique(y) ; [X,Y] = meshgrid(xi,yi) ; Z = reshape(z,...

8 dagar ago | 0

Answered
Add next and previous business date of each date in array row
d = datetime('today') d0 = d-day(1) d1 = d+day(1)

9 dagar ago | 0

Answered
Unable to perform assignment because the indices on the left side are not compatible with the size of the right side.
Your LHS is a single elememnt and RHS is a 1x2 matrix, which cannot be saved. May be you want this? a=[0.3; 0.7]; x0=[1; 1];...

9 dagar ago | 0

| accepted

Answered
Having error "Can't define variable t"
Why do you want to reinstall MATLAB? You are not running the function/ code properly. Copy your code in a single file, make it a...

9 dagar ago | 0

| accepted

Answered
Exporting mesh generated by MATLAB to ASCII file?
Have a look on the model. model.Mesh In the above you have elements as well as nodal connectivity. You can pick from there and...

9 dagar ago | 1

| accepted

Answered
How to remove start and endpoint line?
Introduce NaN at the end of the line.

9 dagar ago | 0

Answered
Why am I getting: "invalid syntax at "(" .A might be missing a closing ")"
You are missing an operator, multiplication operator at many places. (cos^2*( .. %underneath

9 dagar ago | 0

Answered
How do I plot a contour plot using my data?
Your input is a 3D matrix. contourf needs 2D matrix to plot contours. Input a 2D matrix. for i = 1:size(data_mat_ac_removed,3)...

9 dagar ago | 0

Answered
Output vector from structure
[driver(:).status]

10 dagar ago | 0

| accepted

Answered
Accessing multiple folders and extracting specific image files
https://in.mathworks.com/matlabcentral/answers/401335-how-to-access-text-files-from-many-subfolders-within-a-folder https://in...

10 dagar ago | 0

Answered
How do I draw a graph using a for if statement?
x = 0:0.01:30 ; y = zeros(size(x)) ; y(x<0) = 5 ; idx = 0 >= x & x <10 ; y(idx) = 5*x(idx)+5 ; y(x >= 10) = 5*sqrt(...

11 dagar ago | 0

Answered
How its possible do define this function in Matlab?
function g = func(t) if t >=0 && t < 1 g = t+1 ; elseif t >= 1 && t < 2 g = 0 ; elseif t >= 2 && t < 3 g = 2-t...

11 dagar ago | 1

Answered
Vectorize nested for loops
You can reshape the matrices and get what you want. But note that, C will be over written when i-index changes. You may procee...

11 dagar ago | 0

Answered
Hi . what is the difference between numel() and length() of a given vector ?
numel gives you total number of elements present in the array. i.e. it is product of result of size function. A = rand(10,3) ;...

11 dagar ago | 1

| accepted

Answered
How to off the axis in eye diagram and save as image?
set(get(gcf, 'Children'), 'Visible', 'off')

11 dagar ago | 0

| accepted

Answered
How to read tab delimited .txt file line by line (File attached)?
fid = fopen('Data.txt'); tline = fgetl(fid); while ischar(tline) disp(tline) tline = fgetl(fid); end fclose(fid);

11 dagar ago | 1

Answered
Add two rows in a matrix with new datas
E = pascal(10) ; iwant = [E ; mean(E) ; std(E)]

11 dagar ago | 0

Answered
i can't plot this function in matlab
You see, your f is not a complex number. As you are plotting it as complex, you are getting a striaght line. t=-1:0.01:1; a...

11 dagar ago | 0

Answered
looping through columns of a matrix and saving output
This kind of error occurs when you are trying to save more number of elements than it is intiliazed. Example: A = zeros(1,3) ...

11 dagar ago | 0

Answered
Compare two vectors in matlab n*m
A=[1 2 3 4 5 6 7 8 9 10] ; B=4 ; idx = A >= B

11 dagar ago | 0

Answered
making functionality by experiment results
Read about regression. https://in.mathworks.com/help/stats/mvregress.html

12 dagar ago | 0

Answered
find the x value
I will show one for you, rest you should follow the same. % y=10 sqrt(x) + 20 x >= 8 x = linspace(8,100) ; y =...

12 dagar ago | 0

Load more