Answered

Deleting within .mat file

A work-around that is sometimes good enough is to create the variable locally with empty contents, and save with the -append fla...

Deleting within .mat file

A work-around that is sometimes good enough is to create the variable locally with empty contents, and save with the -append fla...

circa un'ora ago | 0

Answered

What is the unit in Legend of Colormap

It is not what matlab would generally call a legend: matlab would call it tick marks or tick labels. There is no unit associa...

What is the unit in Legend of Colormap

It is not what matlab would generally call a legend: matlab would call it tick marks or tick labels. There is no unit associa...

circa 3 ore ago | 1

Answered

Transferring variable names from one table to another

varnames = DataFinal.Properties.VariableNames T = table('VariableNames',varnames, 'RowNames', {'A','B','C'})

Transferring variable names from one table to another

varnames = DataFinal.Properties.VariableNames T = table('VariableNames',varnames, 'RowNames', {'A','B','C'})

circa 4 ore ago | 0

Answered

How to supress the File Overwrite pop-up when using rfwrite()

create private/questdlg.m function str = questdlg(varargin) str = 'Yes' You might have to get more creative such as...

How to supress the File Overwrite pop-up when using rfwrite()

create private/questdlg.m function str = questdlg(varargin) str = 'Yes' You might have to get more creative such as...

circa 5 ore ago | 0

Answered

Divide a 3D matrix into smaller 3D matrixes

YourCell = mat2cell(size(YourArray,1), size(YourArray,2), 4*ones(size(YourArray,3)/4));

Divide a 3D matrix into smaller 3D matrixes

YourCell = mat2cell(size(YourArray,1), size(YourArray,2), 4*ones(size(YourArray,3)/4));

circa 15 ore ago | 0

| accepted

Answered

i am getting an error "Index exceeds the number of array elements (2).", please can someone correct it. thanks in advance

d=(poissrnd(r,L,N,L))/1000; d is fairly likely to have entries that are 0. B=10.^(-13.9 - 3.5*log(d) + 0.8*randn(L,N,L)); Tho...

i am getting an error "Index exceeds the number of array elements (2).", please can someone correct it. thanks in advance

d=(poissrnd(r,L,N,L))/1000; d is fairly likely to have entries that are 0. B=10.^(-13.9 - 3.5*log(d) + 0.8*randn(L,N,L)); Tho...

circa 15 ore ago | 2

| accepted

Answered

How to get the x,z coordinates for a specific y value out of my 3d surf plot?

sh = findobj(gcf, 'type', 'surface'); if isempty(sh) error('No surface found') end sh = sh(1); %in case there were ext...

How to get the x,z coordinates for a specific y value out of my 3d surf plot?

sh = findobj(gcf, 'type', 'surface'); if isempty(sh) error('No surface found') end sh = sh(1); %in case there were ext...

circa 16 ore ago | 0

Answered

Problem regarding fmincon solver

lb = [0.0;0.0;0.0;2.0;1.0]; ub = [4.0;4.0;3.0;4.0;12.0]; x0 = [0.0,0.0,0.0,0.0,0.0]; lb is lower bounds. Your second-last ent...

Problem regarding fmincon solver

lb = [0.0;0.0;0.0;2.0;1.0]; ub = [4.0;4.0;3.0;4.0;12.0]; x0 = [0.0,0.0,0.0,0.0,0.0]; lb is lower bounds. Your second-last ent...

circa 17 ore ago | 0

| accepted

Answered

how to find the mean of a function that I have got the outputs for, I have made my function but I need to find the mean of it and I can't work out how to do this, thanks

out = YourFunction(); mean(out)

how to find the mean of a function that I have got the outputs for, I have made my function but I need to find the mean of it and I can't work out how to do this, thanks

out = YourFunction(); mean(out)

circa 17 ore ago | 0

Answered

Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

RL2 = (RL/2; That is an incomplete expression that would cause problems for what follows.

Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

RL2 = (RL/2; That is an incomplete expression that would cause problems for what follows.

circa 17 ore ago | 0

| accepted

Answered

GUIDE Handle not updating

handles.Antena.Info = readAntenna(selected,currDir); If handles.Antena is a scalar struct then that statement assigns to handle...

GUIDE Handle not updating

handles.Antena.Info = readAntenna(selected,currDir); If handles.Antena is a scalar struct then that statement assigns to handle...

circa 17 ore ago | 0

| accepted

Answered

I need help solving a system of differential equations. The equations are given below, in matrix form. The problem that I'm having is regarding the fact that I have time dependant elements in the matrices.

Rs = 1; %systemic resistance Rm = 0.005; %mitral valve resistance Ra = 0.001; %aortic valve resistance Rc = 0.0398; %chracter...

I need help solving a system of differential equations. The equations are given below, in matrix form. The problem that I'm having is regarding the fact that I have time dependant elements in the matrices.

Rs = 1; %systemic resistance Rm = 0.005; %mitral valve resistance Ra = 0.001; %aortic valve resistance Rc = 0.0398; %chracter...

circa 18 ore ago | 0

Answered

Capture I2S data from FPGA board to MATLAB or Simulink

SoC Blockset Support Package for Xilinx Devices has https://www.mathworks.com/help/soc/ref/i2cmaster.html If I read specifica...

Capture I2S data from FPGA board to MATLAB or Simulink

SoC Blockset Support Package for Xilinx Devices has https://www.mathworks.com/help/soc/ref/i2cmaster.html If I read specifica...

circa 19 ore ago | 0

Answered

How do I derive a parametric slope symbolically?

I wanted to know if Matlab is able to take the argument diff(y,x) given that x and y are functions of t, and derive and then out...

How do I derive a parametric slope symbolically?

I wanted to know if Matlab is able to take the argument diff(y,x) given that x and y are functions of t, and derive and then out...

circa 20 ore ago | 0

| accepted

Answered

How do I name a structure or matrix with variable names (without using eval)

put everything into one variable. You can use dynamic field names for a struct, new fields added as you go. Or you can hold ever...

How do I name a structure or matrix with variable names (without using eval)

put everything into one variable. You can use dynamic field names for a struct, new fields added as you go. Or you can hold ever...

circa 21 ore ago | 0

Answered

How to solve transcendental equation?

f(x) == c implies that f(x) - c = 0. You can construct the expression f(x)-c and use it with a root-finding function such as fso...

How to solve transcendental equation?

f(x) == c implies that f(x) - c = 0. You can construct the expression f(x)-c and use it with a root-finding function such as fso...

circa 21 ore ago | 0

Answered

Error on uninstalling matlab

You can create that and then proceed so that it will exist to be removed. However, past experience shows that a bunch more such ...

Error on uninstalling matlab

You can create that and then proceed so that it will exist to be removed. However, past experience shows that a bunch more such ...

circa 24 ore ago | 0

Answered

Drawing a line without creating a legend entry

https://www.mathworks.com/matlabcentral/answers/25381-how-to-show-partial-legend-in-figure#answer_33306 You can set the IconDi...

Drawing a line without creating a legend entry

https://www.mathworks.com/matlabcentral/answers/25381-how-to-show-partial-legend-in-figure#answer_33306 You can set the IconDi...

1 giorno ago | 1

| accepted

Answered

How to use 'fmincon' in hardware through simulink without any code generation error?

Generally speaking, Simulink Coder does not support matlab functions that you need Coder.extrinsic for. MATLAB Coder does suppo...

How to use 'fmincon' in hardware through simulink without any code generation error?

Generally speaking, Simulink Coder does not support matlab functions that you need Coder.extrinsic for. MATLAB Coder does suppo...

1 giorno ago | 0

Answered

Failed to read xml error when using xmlread

filename = 'InputFileName.xml'; S = fileread(filename); SS = regexprep(S, 'encoding="ISO8859-', 'encoding="ISO-8859-', 'once')...

Failed to read xml error when using xmlread

filename = 'InputFileName.xml'; S = fileread(filename); SS = regexprep(S, 'encoding="ISO8859-', 'encoding="ISO-8859-', 'once')...

1 giorno ago | 0

Answered

Vectorization of For loop

d = sum(b .* reshape(a, 1, 100, 100), [2 3]);

Vectorization of For loop

d = sum(b .* reshape(a, 1, 100, 100), [2 3]);

1 giorno ago | 0

| accepted

Answered

Plotting a set of rings using a single function

r = 50; viscircles([0 0; 0 2*r; 2*r 0; 2*r 2*r], [r;r;r;r], 'color','k', 'linewidth', 1) If you need to be able to plot fewer ...

Plotting a set of rings using a single function

r = 50; viscircles([0 0; 0 2*r; 2*r 0; 2*r 2*r], [r;r;r;r], 'color','k', 'linewidth', 1) If you need to be able to plot fewer ...

1 giorno ago | 0

Answered

Help with Summation in Matlab

My guess: x_k = sum(diff(t_j(1:k)) .* V_xj(1:k-1) + x_1); but the x_1 does not make sense to me in that location: why would yo...

Help with Summation in Matlab

My guess: x_k = sum(diff(t_j(1:k)) .* V_xj(1:k-1) + x_1); but the x_1 does not make sense to me in that location: why would yo...

1 giorno ago | 1

| accepted

Answered

Return a figures from different functions and subplot them

Your function returns the line handes. If you record them, then you can take each handle and set its Parent property to be the a...

Return a figures from different functions and subplot them

Your function returns the line handes. If you record them, then you can take each handle and set its Parent property to be the a...

1 giorno ago | 0

Answered

Scattered data 4D interpolation

What interpolation do you need? For example you could do knnsearch() asking for the 2 nearest neighbours of each query point, ...

Scattered data 4D interpolation

What interpolation do you need? For example you could do knnsearch() asking for the 2 nearest neighbours of each query point, ...

1 giorno ago | 0

Answered

real clock seconds after 1 second delay in input

If you do not need high precision on it being every 1.0 seconds elapsed, then: max = 15; input = [0 0 0 0 1 1 1 0 0 0 1 1 1 1...

real clock seconds after 1 second delay in input

If you do not need high precision on it being every 1.0 seconds elapsed, then: max = 15; input = [0 0 0 0 1 1 1 0 0 0 1 1 1 1...

1 giorno ago | 0

| accepted

Answered

How to extract RGB matrices from stacked TIFF file?

squeeze(mean(YourArray, [1 2])) squeeze(std(YourArray, [], [1 2])) These should give you a 3 x N array of values that are the ...

How to extract RGB matrices from stacked TIFF file?

squeeze(mean(YourArray, [1 2])) squeeze(std(YourArray, [], [1 2])) These should give you a 3 x N array of values that are the ...

1 giorno ago | 0

| accepted

Answered

can calculate mean but not std

You accidentally created a variable named std

can calculate mean but not std

You accidentally created a variable named std

1 giorno ago | 1

Answered

I am not able to integrate heaviside(y-f) for x= 0 to pi/2 and y = 0 to pi/2 (only syms integration "int"). After running the code, output is shown in below and i am not able to get the numerical answer. Can you give some ideas on how to proceed?

Reverse the order of integration. >> integ = int( int(heaviside(y-f), y, 0, pi/2),x, 0, pi/2) integ = pi^2/4 - 1

I am not able to integrate heaviside(y-f) for x= 0 to pi/2 and y = 0 to pi/2 (only syms integration "int"). After running the code, output is shown in below and i am not able to get the numerical answer. Can you give some ideas on how to proceed?

Reverse the order of integration. >> integ = int( int(heaviside(y-f), y, 0, pi/2),x, 0, pi/2) integ = pi^2/4 - 1

1 giorno ago | 2

| accepted