Answered
Why do I get an error when I try to write data into file?
Check the path of the file....check the value of fileID. If the file is not open properly, the value will be negative. There is ...

5 years ago | 1

| accepted

Answered
Interpolate to a common set of values
Let (x,y1) and (X2,y2) be your data set. First find which data set subset to other dataset. LEts say x1 is subset to s2, by usbs...

5 years ago | 1

| accepted

Answered
Why does plot(X,Y,'or') and plot(X,Y) give different results
When you plot with markers (i.e. 'o'), plot will not connect the markers. But when you simply plot, it will try to join them by...

5 years ago | 0

Answered
How to create a matrix in which one column is in datetime format and others are number arrays.
Read about table. You can create a table with first column as datetime and second column as your numbers. Once table is ready, y...

5 years ago | 1

Answered
How to find the mean from multiple plots stored in one matrix?
Two options: Use cell2mat and convert the cell arrays into a matrix and use mean. Run a loop or use Cellfun and calculate the...

5 years ago | 0

| accepted

Answered
Replace NaN with median per column
Read about fillmissing. Or USe: A = rand(20,1) ; % data for demo A(randperm(20,5)) = NaN ; % insert nans M = nanmedian...

5 years ago | 1

Answered
How i can combine three or more than three matrix?
y=cat(1,repmat(x1,size(x2,1),1),repelem(x2,size(x1,1),1)); Or y=[repmat(x1,size(x2,1),1) ; repelem(x2,size(x1,1),1)];

5 years ago | 0

Answered
Gridded Interpolation in a certain volume and leave outside with NaN values
load('var.mat') ; scatter3(xq(:),yq(:),zq(:),2,'k','filled'); hold on scatter3(x,y,z,10,'r','filled') F = scatteredInter...

5 years ago | 0

| accepted

Answered
Matlab Matrcies in output interact with each other
fprintf('Mat1 = \n') disp(Mat1) fprintf('Mat2 = \n') disp(Mat2)

5 years ago | 0

Answered
how to write exponential power?
x = linspace(0,10) ; y=2.^x ; plot(x,y)

5 years ago | 0

| accepted

Answered
How to write dataset in hdf5 format?
You should first create the dimensions/ variables in the file using hdf5create. Read about this.

5 years ago | 0

Answered
How to get my x-axis to start at 1 to 0?
set(gca, 'XDir','reverse') You plot your data and reverse the direction.

5 years ago | 1

| accepted

Answered
Create a set of 165 random numbers
Read about randsample, randperm.

5 years ago | 0

| accepted

Answered
how to plot inverse of a vector field from one domain to another?
As you have the (x,y) for deformed annulus, you can go ahaead with the same procedure to get the vectors, isn't it? If the giv...

5 years ago | 0

Answered
How to get input size in designing custom layer?
Read about deepNetworkDesigner. This will allow you to view the layers in a picture which is a GUI. It shows you all the informa...

5 years ago | 0

Answered
How to adjust edge line spacing using fsurf
PRoceed like this: clc; clear all ; %% numerical parameters e=0.5625; fc=64.1741; ft=64.1741/26.29; m=3*(fc^2-ft^2)/fc/ft*...

5 years ago | 1

| accepted

Answered
How to assign values to a mesh based on xyzc points?
load('variables.mat') ; nx = length(unique(x)) ; ny = length(unique(y)) ; m = 100 ; n = 100 ; xi = linspace(min(x),max(...

5 years ago | 0

Answered
Plotting a vector field in an annulus
clc; clear all ; t=0:0.001:2*pi; x=cos(t); y=sin(t); x1=0.71392*cos(t); y1=0.71392*sin(t); x2=cos(t); y2=sin(t); % Unit ...

5 years ago | 0

| accepted

Answered
Why do I get NaN?
D=giuliayearlyDELTA2.Height; E=D; NEW_4=E *0.35 *10; D is not a string. You need not to ue str2double; already D is in double...

5 years ago | 0

Answered
Plotting sun path diagram problem
clc; clear all; clc clear all number_of_the_yearly_day = 1:1:365; T=1:1:24; declination=23.45*sin((2*pi*(number_of_the_yea...

5 years ago | 0

Answered
Get one best curve (graph) from 5 sets of curve.
Read about polyfit.

5 years ago | 0

Answered
How to mosaic several spatially referenced raster tiles or arrays
Convert all your tile data into three column data i.e. (x,y,z) and then use griddata. Read about gridata. If you are not able to...

5 years ago | 0

| accepted

Answered
Ploting subimages in one frame
Read about montage.

5 years ago | 0

| accepted

Answered
Could anyone help me how to generate the following legend.
str = {'* A o B', '^ C > D', ' - E -- F'} ; A = rand(10,3) ; plot(A) legend(str)

5 years ago | 0

Answered
Adding black and white pixels into an image.
I = normrnd(128,8,[256,256]); imshow(I,[0,255]); % Pick indices to replace with black and white [m,n] = size(I) ; idx = ran...

5 years ago | 1

| accepted

Answered
Not enough input argument
Don't run the code staright away using run/ f5/ green button. You need to provide the input variables and then call the function...

5 years ago | 1

Answered
Could anyone help me how to find the number of input layer nodes and output layer nodes for the code mentioned as below.
You have the code...you should know it. Straight away getting into the problem without studying any basics is not advisable. I t...

5 years ago | 0

Answered
Divide by every N rows
t = 1 ; for i = 1:n % n should be your last index if mod(i,52) == 0 t = i ; end rAPf(i,:) = ((tick...

5 years ago | 0

| accepted

Answered
how to multiply only the second row of matrix with a number
If A is 2*2 matrix. To multiply the second row with a constant: K = 5 ; % a constant A(2,:) = K*A(2,:) ;

5 years ago | 1

Load more