Answered

Memory usage of a function

N = 100; A = rand(N, N); b = rand(N, 1); mem1 = A \ b ; mem2 = sparse(A) \ b ; whos mem1 mem2

Memory usage of a function

N = 100; A = rand(N, N); b = rand(N, 1); mem1 = A \ b ; mem2 = sparse(A) \ b ; whos mem1 mem2

19 dagen ago | 0

Answered

How to color a small squared or half squared zone of the plot?

B = [23 1865; 36 1865; 36 1890 ; 23 1890] ; patch(B(:,1),B(:,2),'b') ; hold on plot(p,t) ;

How to color a small squared or half squared zone of the plot?

B = [23 1865; 36 1865; 36 1890 ; 23 1890] ; patch(B(:,1),B(:,2),'b') ; hold on plot(p,t) ;

19 dagen ago | 0

| accepted

Answered

EXAMPLE OF ALGORITHMIC/AUTOMATED TRADING MATLAB CODE

https://in.mathworks.com/discovery/algorithmic-trading.html https://in.mathworks.com/discovery/automated-trading.html

EXAMPLE OF ALGORITHMIC/AUTOMATED TRADING MATLAB CODE

https://in.mathworks.com/discovery/algorithmic-trading.html https://in.mathworks.com/discovery/automated-trading.html

19 dagen ago | 0

Answered

I have a matrix P having 100 rows and 2001 columns. can you please help me to make a probability distribution curve of columns and mean line of rows.

x = rand(100,2001) ; % dummy data fro demo mx = mean(x) ; % mean of row elements h = histfit(mx,100,'kernel')

I have a matrix P having 100 rows and 2001 columns. can you please help me to make a probability distribution curve of columns and mean line of rows.

x = rand(100,2001) ; % dummy data fro demo mx = mean(x) ; % mean of row elements h = histfit(mx,100,'kernel')

19 dagen ago | 1

Answered

how to change matlab answers type?

Read about format. https://in.mathworks.com/help/matlab/matlab_env/format-output.html Try format short

how to change matlab answers type?

Read about format. https://in.mathworks.com/help/matlab/matlab_env/format-output.html Try format short

20 dagen ago | 1

Answered

total marks and percentage in marksheet of excelfile

T = readtable(myexcelfile) ; marks = table2array(T(:,3:6)) ; total_marks = sum(marks)/400 ; % four subjects each 100 marks ...

total marks and percentage in marksheet of excelfile

T = readtable(myexcelfile) ; marks = table2array(T(:,3:6)) ; total_marks = sum(marks)/400 ; % four subjects each 100 marks ...

20 dagen ago | 0

Answered

Not enough input Arguments

The error is clear. You are trying to run the function by hitting the run button/ F5 key. You need to provide the inputs to the ...

Not enough input Arguments

The error is clear. You are trying to run the function by hitting the run button/ F5 key. You need to provide the inputs to the ...

20 dagen ago | 0

| accepted

Answered

how can i bring 2 figures together?

Read about hold on. clc clear x1 = [0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5]; y1 = 2+exp((-x1).^3); plot(x1,y1) hold...

how can i bring 2 figures together?

Read about hold on. clc clear x1 = [0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5]; y1 = 2+exp((-x1).^3); plot(x1,y1) hold...

20 dagen ago | 1

Answered

How can we calculate weight in CNN model?

Read here: https://in.mathworks.com/help/deeplearning/ref/trainingoptions.html#mw_4f311de8-ad53-4201-ac1a-47f66e0de52d Have a ...

How can we calculate weight in CNN model?

Read here: https://in.mathworks.com/help/deeplearning/ref/trainingoptions.html#mw_4f311de8-ad53-4201-ac1a-47f66e0de52d Have a ...

20 dagen ago | 0

| accepted

Answered

Plot two functions with several changing variables

p = 80; m = 10; n = 1:1:10; g = 9.81; N = 11; Lext = 68:0.1:80; L = 68; [n,Lext] = meshgrid(n,Lext) ; k = p.*g + m.*g...

Plot two functions with several changing variables

p = 80; m = 10; n = 1:1:10; g = 9.81; N = 11; Lext = 68:0.1:80; L = 68; [n,Lext] = meshgrid(n,Lext) ; k = p.*g + m.*g...

21 dagen ago | 0

Answered

export numerical data from selected data tips

If S is the structure. x = S(1).XData ; y = S(1).YData ;

export numerical data from selected data tips

If S is the structure. x = S(1).XData ; y = S(1).YData ;

21 dagen ago | 0

Answered

What might be wrong with the code?

% The Boltzman Equation E1=-13.6; E2=-3.4; k=8.617*10.^-5; g1=2; g2=8; % T=[5000;10000;15000;20000;25000]; ...

What might be wrong with the code?

% The Boltzman Equation E1=-13.6; E2=-3.4; k=8.617*10.^-5; g1=2; g2=8; % T=[5000;10000;15000;20000;25000]; ...

21 dagen ago | 0

Answered

How to do what MATLAB does with array[index:index] in Maxima?

v = [1 2 3 4 5] ; N = length(v) ; iwant = cell(N,1) ; for i = 1:N iwant{i} = v(1:i) ; end celldisp(iwant)

How to do what MATLAB does with array[index:index] in Maxima?

v = [1 2 3 4 5] ; N = length(v) ; iwant = cell(N,1) ; for i = 1:N iwant{i} = v(1:i) ; end celldisp(iwant)

21 dagen ago | 0

Answered

How to calculate MSE or RMSE of data points in 3D space?

https://in.mathworks.com/matlabcentral/answers/4064-rmse-root-mean-square-error

How to calculate MSE or RMSE of data points in 3D space?

https://in.mathworks.com/matlabcentral/answers/4064-rmse-root-mean-square-error

21 dagen ago | 0

Answered

How can i make geotiff file with 2D longitude, 2D latitude and 2D data

Let A be your matrix and (xmin,xmax) be your xlimits and (ymin,ymax) be your y limits. % Get geo referenced R = georasterref...

How can i make geotiff file with 2D longitude, 2D latitude and 2D data

Let A be your matrix and (xmin,xmax) be your xlimits and (ymin,ymax) be your y limits. % Get geo referenced R = georasterref...

22 dagen ago | 0

Answered

How to extract x, y data for particular/selected points from a scatter plot?

Read about getpts, ginput. These functions will help to pick points. [x,y] = getpts() ; % double click to exit [x,y] = ginpu...

How to extract x, y data for particular/selected points from a scatter plot?

Read about getpts, ginput. These functions will help to pick points. [x,y] = getpts() ; % double click to exit [x,y] = ginpu...

24 dagen ago | 1

| accepted

Answered

How to map detected Braille dots (and their XY coordinates) into letters ( 0's 1's matrices of 3*2)?

You can make your all required matrices into a 3D. And compare the obtained matrix out of it (read about ismember), get the inde...

How to map detected Braille dots (and their XY coordinates) into letters ( 0's 1's matrices of 3*2)?

You can make your all required matrices into a 3D. And compare the obtained matrix out of it (read about ismember), get the inde...

25 dagen ago | 0

Answered

The matlab quiver arrow is lying down.

Play with scale. scale = 0.5 ; figure() quiver(time,Height,uu,vv,scale)

The matlab quiver arrow is lying down.

Play with scale. scale = 0.5 ; figure() quiver(time,Height,uu,vv,scale)

25 dagen ago | 0

Answered

Unable to perform assignment because the size of the left side is 1-by-3-by-12-by-3 and the size of the right side is 3-by-12-by-2

When you are not sure of the dimension of the RHS matrix to save into LHS, you better save into a cell. flist=dir('*nirs'); st...

Unable to perform assignment because the size of the left side is 1-by-3-by-12-by-3 and the size of the right side is 3-by-12-by-2

When you are not sure of the dimension of the RHS matrix to save into LHS, you better save into a cell. flist=dir('*nirs'); st...

25 dagen ago | 0

Answered

Import 3D matrix in .mat File

y=load('data.mat') names = fieldnames(y) ; n = length(names); iwant = zeros(128,128,n) ; for i = 1:n iwant(:,:,i...

Import 3D matrix in .mat File

y=load('data.mat') names = fieldnames(y) ; n = length(names); iwant = zeros(128,128,n) ; for i = 1:n iwant(:,:,i...

25 dagen ago | 0

Answered

How to rename a vertices of agraphs

a=[1 2 3]; b=[3 2 1]; g=graph(a,b); p=plot(g); L={'a' 'b' 'c'}; p.NodeLabel=L;

How to rename a vertices of agraphs

a=[1 2 3]; b=[3 2 1]; g=graph(a,b); p=plot(g); L={'a' 'b' 'c'}; p.NodeLabel=L;

26 dagen ago | 1

| accepted

Answered

How to do symbolic integration

Try substituing the values of m and n. syms omega positive real % syms n m positive integer syms x % assuming omega::rea...

How to do symbolic integration

Try substituing the values of m and n. syms omega positive real % syms n m positive integer syms x % assuming omega::rea...

26 dagen ago | 1

Answered

x=[1 2 3 4]y=[2 4 5 10]x1=[1,1.5,2.2,3.5,4] how to get previous matching value(from y) for x1 by refering x expected answer y1=[2 2 4 5 10] without forloop

x=[1 2 3 4]; y=[2 4 5 10]; x1=[1,1.5,2.2,3.5,4] ; % y1=[2 2 4 5 5] ; y1 = interp1(x,y,x1)

x=[1 2 3 4]y=[2 4 5 10]x1=[1,1.5,2.2,3.5,4] how to get previous matching value(from y) for x1 by refering x expected answer y1=[2 2 4 5 10] without forloop

x=[1 2 3 4]; y=[2 4 5 10]; x1=[1,1.5,2.2,3.5,4] ; % y1=[2 2 4 5 5] ; y1 = interp1(x,y,x1)

26 dagen ago | 0

Answered

How can i find the peak/maxima of a plot in just a selected region?

If you know the range of your values, use logical indexing and use max to get maximum in that region. If you know the range of...

How can i find the peak/maxima of a plot in just a selected region?

If you know the range of your values, use logical indexing and use max to get maximum in that region. If you know the range of...

27 dagen ago | 0

Answered

How to illustrate number of events per year/month (I want to

T = x1994_2020; idx = isnat(T.(1)) ; % pick dates T = T(~idx,:) ; % reove data for which there is no date [y,m,d,H,M,S...

How to illustrate number of events per year/month (I want to

T = x1994_2020; idx = isnat(T.(1)) ; % pick dates T = T(~idx,:) ; % reove data for which there is no date [y,m,d,H,M,S...

27 dagen ago | 0

| accepted

Answered

Index of repeated values

ad=[1 0 0 0 1 1 1 0 0 0 0 1 1 1 0 0] ; ad0 = zeros(size(ad)) ; ad0(logical(ad)) = find(ad) ; ii = zeros(size(ad0)); jj = a...

Index of repeated values

ad=[1 0 0 0 1 1 1 0 0 0 0 1 1 1 0 0] ; ad0 = zeros(size(ad)) ; ad0(logical(ad)) = find(ad) ; ii = zeros(size(ad0)); jj = a...

27 dagen ago | 1

| accepted

Answered

Generating matrix of all possible combination

a = 100 : 100 : 1000; b = 0.1 : 0.1 : 1; iwant = zeros(10,2) ; iwant(1:2:10,:) = a(randi(length(a),5,2)) ; iwant(2:2:1...

Generating matrix of all possible combination

a = 100 : 100 : 1000; b = 0.1 : 0.1 : 1; iwant = zeros(10,2) ; iwant(1:2:10,:) = a(randi(length(a),5,2)) ; iwant(2:2:1...

28 dagen ago | 0

Answered

Streamline pathline and streakline

t = linspace(0,2*pi) ; u = sin(t) ; v = 2*t ; [u,v] = meshgrid(u,v) ; streamslice(u,v)

Streamline pathline and streakline

t = linspace(0,2*pi) ; u = sin(t) ; v = 2*t ; [u,v] = meshgrid(u,v) ; streamslice(u,v)

28 dagen ago | 1