**Statistics**

RANK**22**

of 283,706

REPUTATION**10,646**

CONTRIBUTIONS

**0** Questions

**3,407** Answers

ANSWER ACCEPTANCE **
0.00%
**

VOTES RECEIVED**980**

RANK

of 19,159

REPUTATION**N/A**

AVERAGE RATING**0.00**

CONTRIBUTIONS**0** Files

DOWNLOADS **0**

ALL TIME DOWNLOADS**0**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

How can i interpolate values to create image with desired number of pixels

You've got m and n swapped in the definitions of X and Y. [n,m]=size(log_env); X=linspace(1,m,512); Y=linspace(1,n,512); [Xq...

16 hours ago | 1

| accepted

How can I fill the area under a curve with different colors?

Here's one way: x = 1:100; y = log(x); xb = [1 15 55.5 100]; yb = interp1(x,y,xb); plot(x,y) hold on colors = 'gyr'...

19 hours ago | 0

how do I add the maximum value of arr into arrSorted within the while loop?

while arr > 0 This iterates while all elements of the array arr are greater than zero. If arr contains elements that are less t...

2 days ago | 0

How to choose color in bar graph

The colors appear to change on each run because you're plotting into the same axes (with hold on) each time. It's the same as p...

3 days ago | 0

How can I get a loop within a loop to return a value as a matrix?

B = -0.388; C = -0.026; P = 1.2; T = 305:5:550; R = 8.314; V9 = mvolume9(B,C,P,T,R); disp(V9) function V9 = mvolume9(B,C,...

3 days ago | 0

| accepted

How do I pass data between functions in MATLAB App Designer?

load(filename) creates variables in a workspace (i.e., a function's workspace or the base workspace - in this case the workspace...

3 days ago | 1

| accepted

Merge multiple matrices with different columns into a single matrix

load cell_test One way: % get the size of each matrix in cell_test(:,1) sz = cellfun(@size,cell_test(:,1),'UniformOutput',fal...

3 days ago | 0

| accepted

How to replicate a graph from some data collected using webplot digitiser

Strength_Mpa = [ 20 2880 20 3280 20 3990 1200 2000 1200...

3 days ago | 0

How to read and plot a txt file

filename = 'Data1.txt'; T = readtable(filename) plot(T.(1),T.(2))

3 days ago | 0

| accepted

How can I produce a matrix with below condition?

Something like this may be good enough: k = 8; result = [1; rand(k-1,1)]

3 days ago | 1

| accepted

contour lines obscured on a surface.

If you only need to see the plot from above (2d, xy view), then you can set Z to zero in the surf call but still use your Z for ...

3 days ago | 0

| accepted

secondary x-label not displayed in the figure

I think you need to set the axes' position: % made-up data: lszs = 3; norm_Phi_bR = [1 2]; Entr_eff = [0 0; 1 2]/10; norm_P...

3 days ago | 0

Single legend entry for a line with endpoints.

x=0:90; y=30*cosd(x-30).^6-20; plot(x,y,'-b') hold on x_red = x(26:36); y_red = y(26:36); plot(x_red,y_red,'-ro','MarkerFa...

3 days ago | 1

| accepted

readtable error : read all columns into a single column

filename = 'data_20091130.txt'; % detect import options, specifying tab as delimiter: opts = detectImportOptions(filename,'D...

4 days ago | 0

How to Convert data from HEX codes to Numeric

format long g T = readtable('hex codes example.xlsx') T.DecCodes = hex2dec(strrep(T.HexCodes,' ','')) writetable(T,'hex and d...

4 days ago | 1

Shading a delimited area in a contour plot

Maybe something like this. Adapt as needed. E = 23; F = 0:0.01:0.3; K = round(6:0.2:20, 2); [X, Y] = meshgrid(F, K); Re...

4 days ago | 0

| accepted

Table formatting problem with cell and array matrix

% inputs pnamesNew ={'*H2';'H2O';'*O2';'H2O(S)';'*OH';'*H';'*O';'HO2';'H2O2';'O3'}; maxFracsNew = [9.6220e-01;8.9880e-01;1.097...

5 days ago | 0

| accepted

Reading data from a .data file

readtable with 'FileType' and 'NumHeaderLines' parameters specified may work: % I zipped the example .data file I made, in orde...

5 days ago | 0

| accepted

Go around matrices/vectors columns

Here's one way, which is generalized in that it will work for other polygons besides pentagon, but it assumes the vertices are g...

5 days ago | 1

| accepted

Help extracting data from 3D matrices

Here's one way: A = cat(3,[1 0; 0 0],[0 2; 0 0],[0 0; 3 0]); v = [2;3]; [m,n,l] = size(A); idx = sub2ind([m,n,l],repelem(1...

5 days ago | 0

| accepted

Code to check for open uifigures

This will find all the uifigures you have open and store them in the variable f. Then you can delete them or whatever you want. ...

5 days ago | 0

for loop keeps putting out error

You have defined a variable called size, which means that the next time the code tries to use the built-in size function (i.e., ...

6 days ago | 0

How to create tiledlayout grid in vertical order

Set up variables: n_rows = 3; n_cols = 2; n = n_rows*n_cols; data = (1:n)+zeros(10,1); Default tiledlayout order, for r...

6 days ago | 0

My calculation for respiratory rate shows the same bpm for my 3 waveforms.

You are calculating the average of the inverse of the differences of t, but t is essentially just a vector of all time indices: ...

7 days ago | 0

Detrending data changing matrix size

Do you mean this? DFRT.data(1:128,:) = detrend(DFRT.data(1:128,:));

7 days ago | 0

How to make all the .tif files with the same size?

min_sz = min(sz,[],1); for ii = 1:N files(ii).data = files(ii).data(1:min_sz(1),1:min_sz(2)); end

7 days ago | 1

| accepted

Unable to perform assignment because the left and right sides have a different number of elements. Error in Assignment1Motorbike (line 139)

The culprit is this line: x_rd = vb * diff( sin(Q) ); Q is a scalar, so sin(Q) is a scalar, so diff(sin(Q)) is empty, so x_rd ...

9 days ago | 0

| accepted

resize matrix based on indices

input_file = 'logfile_example-30-09-23 .xlsx'; output_file = 'trials_2_5_7_10_only.xlsx'; ids = [2 5 7 10]; id_column = 3; ...

10 days ago | 0

| accepted

rename txt file within a specific folder

folder = dir('C:\...\...\...\*.txt'); % file_name = 'test.txt'; final_file_name = 'analysis.txt'; for id = 1 p = folder(...

10 days ago | 0

Matlab divides with the same value in every iteration

You are overwriting the variable y on each iteration of the loop. for i = 2:5 % ... y=x/(pi*D(i)^2./4); % ... e...

10 days ago | 0

| accepted