Answered
Error because the size of the left side is 4-by-4 and the size of the right side is 1-by-4.
data(1,:,t) = data2d(t,:).*data2d(t,:); This is saving the data into initialized matrix problem. You need to check the dimensio...

5 years ago | 0

| accepted

Answered
how to convert mat file into excel or csv
Read about the function writetable.

5 years ago | 0

Answered
contour plot in matlab
B = B' ; [r,c] = size(B); lay = 10:10:60 ; nlay = length(lay) ; out = permute(reshape(B',[c,r/nlay,nlay]),[2,1,3]); fo...

5 years ago | 0

Answered
contour plot in matlab
Refer this: https://in.mathworks.com/matlabcentral/answers/412639-creating-surface-plot-from-a-matrix-with-3-columns After ge...

5 years ago | 0

Answered
Permute the values of cells in the same matrix
Let A be your matrix. [A(59,2),A(60,2)]=deal(A(60,2),A(59,2)) ; or t = A(59,2) ; A(59,2) = A(60,2) ; A(60,2) = t ;

5 years ago | 0

| accepted

Answered
Unable to perform assignment because the left and right sides have a different number of elements.
%% save start date time filename = 'Format_competition.xlsx'; table_starttimes = cell(100,1); formatOut = 'HH:MM:SS'; for i...

5 years ago | 1

Answered
could anyone help me how to change the letter x that appears everywhere in the code to letter y in a single step.
SEarch for the character 'X', use ctr + f, repalce X with Y, say replace all.

5 years ago | 0

| accepted

Answered
how to store udp data in struct matlab
S(1) = struct ; S(1).distance = rand(10,1) ; % your distance array S(1).direction = rand(10,1) ; % your direction array ...

5 years ago | 0

Answered
Calculatong P values for a set of data
MAy be this is what you need. https://in.mathworks.com/help/stats/kstest.html

5 years ago | 0

Answered
display the maximum value of a dynamically updated colorbar
for i = 1:10 Z = peaks(100)*rand ; pcolor(Z) ; h = colorbar ; val0 = min(Z(:)) ; val1 = max(Z(:))...

5 years ago | 0

| accepted

Answered
Index in position 1 exceeds array bounds (must not exceed 1).
A = rand(1,10) ; A(1) % no error A(2) % no error A(2,1) % error, becuase A is a row matrix In your case also check ar...

5 years ago | 0

Answered
Generate the fix radius circles within a specific area
r = 0.1 ; % radius of circle x = 0:2*r:1 ; y = 0:2*r:1 ; [X,Y] = meshgrid(x,y) ; th = linspace(0,2*pi) ; xc = r*c...

5 years ago | 0

| accepted

Answered
How to write a character sequence for parallel symbol?
\parallel MATLAB uses the latex symbols. If it doesn't work, you may go for '||' this right?

5 years ago | 0

Answered
Problem with reading colorful images with png format
Note thar your image is already a gray scale image, it is not RGB image. If you are expecting to show up the same in MATLAB try...

5 years ago | 0

| accepted

Answered
How can I merge two netCDF files?
To read ncfile data, just you need to know only two functions, ncdisp - this will give you information about what variables ar...

5 years ago | 1

Answered
Changing CNN layer using Deep Network Designer
[net,train_info] = trainNetwork(inputTrain,targetTrain,lgraph_1,options);

5 years ago | 1

| accepted

Answered
shifting image up by known number of pixels
Do it by indexing.....Read about MATLAB array indexing.

5 years ago | 0

| accepted

Answered
How to plot 3d patch with Faces and vertices
Try this: patch('faces',faces,'vertices',vertices(:,1:2),'facevertexcdata',vertices(:,3),'facecolor','interp','edgecolor','none...

5 years ago | 0

| accepted

Answered
code works as part of main script but not as a function?
y_FAST = 'myfile.mat' ; % give your file name here y_fast=FAST_Power_Value(y_FAST) ; And use this function: function y_f...

5 years ago | 0

| accepted

Answered
how to get all combinations of a columns of six different matrices
idx = nchoosek(1:6,4)

5 years ago | 0

Answered
how to plot x axis with ratio unit instead of proportional unit
You can plot log of the value. Read about semilog.

5 years ago | 0

Answered
"Properly vectorize your function"-warning. fcontour & mvnpdf
REad about element by element operations. https://in.mathworks.com/help/matlab/matlab_prog/array-vs-matrix-operations.html

5 years ago | 0

Answered
Delete the 4 last digits of a message
str = 'Hello World' str(end-3:end) = []

5 years ago | 1

Answered
How to improve my contour plot sensitivity?
Try: pcolor(xUnq,yUnq,zMat) shading interp colorbar

5 years ago | 0

| accepted

Answered
create maps with file .txt
Refer this: https://in.mathworks.com/matlabcentral/answers/412639-creating-surface-plot-from-a-matrix-with-3-columns

5 years ago | 0

| accepted

Answered
How to find the locations or indices of lower and upper ends of FWHM of a peak
This might be usefu: https://in.mathworks.com/matlabcentral/answers/862960-how-to-calculate-the-full-wave-half-maximum

5 years ago | 0

Answered
Find the intersection point between plot that was made from data and horizontal lane.
You can use this file exchange function: https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections

5 years ago | 0

Answered
got a vector from a plot
Read about quiver. You can use this for vector arrow plots.

5 years ago | 0

Answered
Create month array?
year = 2020 ; t = datetime(year,1,1):dateime(year,12,31) ;

5 years ago | 0

Load more