Answered

USB-C communication

usb-c ports just show up as USB ports. usb-c is a physical connector, not a signalling protocol: the signalling protocol is USB....

USB-C communication

usb-c ports just show up as USB ports. usb-c is a physical connector, not a signalling protocol: the signalling protocol is USB....

alrededor de 1 hora ago | 0

Answered

Creating Sphere using Cuboids of varying size

%assume center at xc, yc, zc dx = sidelength/2; %Left/Right, Front/Back, Down/Up vertices = [ -1, -1, -1 %LFD 1 -...

Creating Sphere using Cuboids of varying size

%assume center at xc, yc, zc dx = sidelength/2; %Left/Right, Front/Back, Down/Up vertices = [ -1, -1, -1 %LFD 1 -...

alrededor de 1 hora ago | 0

Answered

Change the position of a field in a structure

Use struct2cell() on the old structure, and fieldnames() . Then insert a new cell of values for the new field at the top of the ...

Change the position of a field in a structure

Use struct2cell() on the old structure, and fieldnames() . Then insert a new cell of values for the new field at the top of the ...

alrededor de 2 horas ago | 0

Answered

How generate a patch object with tetramesh?

In R2020a and earlier: Record the vector returned by tetramesh(), and call handle() on it. The result you get back will be a pa...

How generate a patch object with tetramesh?

In R2020a and earlier: Record the vector returned by tetramesh(), and call handle() on it. The result you get back will be a pa...

alrededor de 2 horas ago | 0

Answered

How can I animate this plot3?

geoplot3() returns a line object. You can pull the XData, YData, ZData coordinates out of the line object and delete the line ob...

How can I animate this plot3?

geoplot3() returns a line object. You can pull the XData, YData, ZData coordinates out of the line object and delete the line ob...

alrededor de 2 horas ago | 0

Answered

Call mex function using system()?

In Linux, executables can have any valid file name. The file extension is not considered by the operating system when deciding h...

Call mex function using system()?

In Linux, executables can have any valid file name. The file extension is not considered by the operating system when deciding h...

alrededor de 2 horas ago | 0

| accepted

Answered

Using the Cancel button in uiprogressdlg to immediately stop execution

https://www.mathworks.com/matlabcentral/answers/496530-using-timer-how-can-i-cleanly-exit-a-function-execution-when-the-timer-fi...

Using the Cancel button in uiprogressdlg to immediately stop execution

https://www.mathworks.com/matlabcentral/answers/496530-using-timer-how-can-i-cleanly-exit-a-function-execution-when-the-timer-fi...

alrededor de 3 horas ago | 0

Answered

Creating regenerative random numbers

rng(655321) %or use any other positive integer constant

Creating regenerative random numbers

rng(655321) %or use any other positive integer constant

alrededor de 3 horas ago | 0

Answered

valid indices for 'output' are restricted in parfor loop

for j= 1:100 SNR = list(j); base = (j-1)*1000; parfor i = 1:1000 totallist(base+i,1) = SNR; ou...

valid indices for 'output' are restricted in parfor loop

for j= 1:100 SNR = list(j); base = (j-1)*1000; parfor i = 1:1000 totallist(base+i,1) = SNR; ou...

alrededor de 3 horas ago | 1

| accepted

Answered

How to get matlab to read the code

Your code has load(strcat('C:\Users\User\Dropbox\My PC (LAPTOP-8G4JCC0U)\Documents\onscale',num2str(i),'\2d_simple_array.ma...

How to get matlab to read the code

Your code has load(strcat('C:\Users\User\Dropbox\My PC (LAPTOP-8G4JCC0U)\Documents\onscale',num2str(i),'\2d_simple_array.ma...

alrededor de 5 horas ago | 0

Answered

How can I create a matlab matrix below?

N = 6; diag(-2*ones(1,N)) + diag(ones(1,N-1),-1) + diag(ones(1,N-1),1)

How can I create a matlab matrix below?

N = 6; diag(-2*ones(1,N)) + diag(ones(1,N-1),-1) + diag(ones(1,N-1),1)

alrededor de 5 horas ago | 0

Answered

How can i find unknown variable in matrix

syms D [2 1] syms AE sols = solve([0; -2] == AE * [0.405 0.096; 0.096 0.128] * D + [0; 0],D) simplify([sols.D1; sols.D2]) Th...

How can i find unknown variable in matrix

syms D [2 1] syms AE sols = solve([0; -2] == AE * [0.405 0.096; 0.096 0.128] * D + [0; 0],D) simplify([sols.D1; sols.D2]) Th...

alrededor de 5 horas ago | 0

| accepted

Answered

I need help figuring the code out.

You can use a Monte Carlo method: format long g R = randi([2 3]) xy = rand(10000,2) * exp(R); x = xy(:,1); y = xy(:,2); mas...

I need help figuring the code out.

You can use a Monte Carlo method: format long g R = randi([2 3]) xy = rand(10000,2) * exp(R); x = xy(:,1); y = xy(:,2); mas...

alrededor de 6 horas ago | 0

Answered

Using isnan to check if there is any NaNs in a window and setting all the values to NaN if there are any.

for i=1:11:T; for k=1:3; if any(isnan(y(i:i+11,k))) X(i:i+11,k) =NaN; end end end

Using isnan to check if there is any NaNs in a window and setting all the values to NaN if there are any.

for i=1:11:T; for k=1:3; if any(isnan(y(i:i+11,k))) X(i:i+11,k) =NaN; end end end

alrededor de 7 horas ago | 0

| accepted

Answered

How to convert cell to matrix

new_matrix{i}=t{:,i*3};

How to convert cell to matrix

new_matrix{i}=t{:,i*3};

alrededor de 9 horas ago | 0

| accepted

Answered

run the script without opening the figure, its possible?

set(0, 'DefaultFigureVisible', 'off') before you run the code. This will last for the rest of your MATLAB session unless you r...

run the script without opening the figure, its possible?

set(0, 'DefaultFigureVisible', 'off') before you run the code. This will last for the rest of your MATLAB session unless you r...

alrededor de 9 horas ago | 1

Answered

How to define k in bcfun?

In bcfun, for ya, you sould calculate k based on the x that would be used for the first boundary condition, and for yb you shoul...

How to define k in bcfun?

In bcfun, for ya, you sould calculate k based on the x that would be used for the first boundary condition, and for yb you shoul...

alrededor de 9 horas ago | 0

Answered

How do I declare varibles whose outputs are expected from Matlab simply without so many rules, like for example in c++?

You are trying to construct a vector of function handles. You cannot do that in MATLAB. This is because in MATLAB, () indicates ...

How do I declare varibles whose outputs are expected from Matlab simply without so many rules, like for example in c++?

You are trying to construct a vector of function handles. You cannot do that in MATLAB. This is because in MATLAB, () indicates ...

alrededor de 13 horas ago | 0

| accepted

Answered

How to convert dataset of .mat to .tif files?

You need to use the Tiff() class https://www.mathworks.com/help/matlab/ref/tiff.html Use SamplesPerPixel = 38, and use ExtraSa...

How to convert dataset of .mat to .tif files?

You need to use the Tiff() class https://www.mathworks.com/help/matlab/ref/tiff.html Use SamplesPerPixel = 38, and use ExtraSa...

alrededor de 22 horas ago | 0

Answered

Can we apply scatter3() on high dimension matrix?

Yes, but it can become quite difficult to understand. You can use scatter3(x, y, z, PointSize, Color) Here PointSize and Colo...

Can we apply scatter3() on high dimension matrix?

Yes, but it can become quite difficult to understand. You can use scatter3(x, y, z, PointSize, Color) Here PointSize and Colo...

alrededor de 22 horas ago | 0

Answered

Using Two Expressions together in factor()

syms x y f = arrayfun(@factor, [x^2-y^2,x^3+y^3], 'uniform', 0); vertcat(f{:})

Using Two Expressions together in factor()

syms x y f = arrayfun(@factor, [x^2-y^2,x^3+y^3], 'uniform', 0); vertcat(f{:})

alrededor de 22 horas ago | 0

| accepted

Answered

infinite Integration of hyperbolic function

y5=@(x)(4*hh.^2-4.*(x.^2)); y6=@(x)y4(x)./y5(x); You have a division by a constant minus 4*x^2 . But that can pass thr...

infinite Integration of hyperbolic function

y5=@(x)(4*hh.^2-4.*(x.^2)); y6=@(x)y4(x)./y5(x); You have a division by a constant minus 4*x^2 . But that can pass thr...

alrededor de 23 horas ago | 0

| accepted

Answered

How to find the unknown for singular matrix

nulls = null(A); candidates = nulls./nulls(:,1); The columns in candidates should start with 1 ... unless they start with NaN ...

How to find the unknown for singular matrix

nulls = null(A); candidates = nulls./nulls(:,1); The columns in candidates should start with 1 ... unless they start with NaN ...

alrededor de 23 horas ago | 1

| accepted

Answered

How to use "inspect" command in compiled code using MATLAB compiler?

inspect() is a development tool that I would not expect to be compilable . https://www.mathworks.com/products/compiler/supporte...

How to use "inspect" command in compiled code using MATLAB compiler?

inspect() is a development tool that I would not expect to be compilable . https://www.mathworks.com/products/compiler/supporte...

1 día ago | 0

Answered

Can I assign a variable to a number in a matrix from another matrix?

A = magic(7) E = eig(A) w1 = E(1,1) w2 = E(2,1) w3 = E(3,1) m1 = 3; m2 = 11; m3 = -7; output = [ m1*w1^2 ...

Can I assign a variable to a number in a matrix from another matrix?

A = magic(7) E = eig(A) w1 = E(1,1) w2 = E(2,1) w3 = E(3,1) m1 = 3; m2 = 11; m3 = -7; output = [ m1*w1^2 ...

1 día ago | 0

| accepted

Answered

how do I merge multiple matrices into one?

One approach N = 4; %50 in your original Rows = 2; %1111 in your original %generate some data for illustration M = ar...

how do I merge multiple matrices into one?

One approach N = 4; %50 in your original Rows = 2; %1111 in your original %generate some data for illustration M = ar...

1 día ago | 0

Answered

I'm trying to convert Matlab code to C++ or C, but it has some errors. Can someone help me with this?

My adjusted version of the code passes compilation, and produces graphs. However I can demonstrate that the algorithm is wrong. ...

I'm trying to convert Matlab code to C++ or C, but it has some errors. Can someone help me with this?

My adjusted version of the code passes compilation, and produces graphs. However I can demonstrate that the algorithm is wrong. ...

1 día ago | 0

Answered

I need help with running two for loops

you do not reset dif when you move on to the next j value so the while will end immediately.

I need help with running two for loops

you do not reset dif when you move on to the next j value so the while will end immediately.

2 días ago | 0

Answered

closed form solution in a system of equation

There are four families of solutions. [X1 == 1, X2 == (cos(Lz1*h*sin(RootOf(Lz1^2*cos(Z)^2*h^2+cos(Z)^2*Z^2*k1^2-Lz1^2*h^2))/c...

closed form solution in a system of equation

There are four families of solutions. [X1 == 1, X2 == (cos(Lz1*h*sin(RootOf(Lz1^2*cos(Z)^2*h^2+cos(Z)^2*Z^2*k1^2-Lz1^2*h^2))/c...

2 días ago | 0

Answered

How to import and read multiple .txt files where each .txt file contains multiple number of x,y,z values??

You can use https://www.mathworks.com/help/matlab/ref/matlab.io.datastore.tabulartextdatastore.html Or projectdir = 'name_of_...

How to import and read multiple .txt files where each .txt file contains multiple number of x,y,z values??

You can use https://www.mathworks.com/help/matlab/ref/matlab.io.datastore.tabulartextdatastore.html Or projectdir = 'name_of_...

2 días ago | 0