Answered

complex value of syms function for optimization

syms a b c d ; b=c+j*d; Okay, b is a symbolic number that might or might not be complex. "might not be" because d could be 0, ...

complex value of syms function for optimization

syms a b c d ; b=c+j*d; Okay, b is a symbolic number that might or might not be complex. "might not be" because d could be 0, ...

10 hours ago | 0

Answered

Converting a whole number to base 2 (Binary Operation)

Consider 19 as an example. 19 is odd, which is to say that the remainder when divided by 2 is 1. Write down the 1, subtract it ...

Converting a whole number to base 2 (Binary Operation)

Consider 19 as an example. 19 is odd, which is to say that the remainder when divided by 2 is 1. Write down the 1, subtract it ...

10 hours ago | 0

Answered

importing the excel data into matlab in symbolic math tool

Your X is a vector with four elements. When you use it in the equations you are creating a system of four simultaneous equations...

importing the excel data into matlab in symbolic math tool

Your X is a vector with four elements. When you use it in the equations you are creating a system of four simultaneous equations...

11 hours ago | 0

Answered

Creating Random Sparse Matrices Using For Loop

N = 100; S = 100; RM = cell(N,1); B = zeros(1,N); for K = 1 : N RM{K} = sprand(S, S, 0.01); B(K) = bandwidth(RM{K})...

Creating Random Sparse Matrices Using For Loop

N = 100; S = 100; RM = cell(N,1); B = zeros(1,N); for K = 1 : N RM{K} = sprand(S, S, 0.01); B(K) = bandwidth(RM{K})...

14 hours ago | 0

Answered

Task,solving in the fastest way

how to get a solution the fastest Commercial quantum computers are available from DWave and IBM. HP expects to release its vers...

Task,solving in the fastest way

how to get a solution the fastest Commercial quantum computers are available from DWave and IBM. HP expects to release its vers...

15 hours ago | 1

Answered

Simplifying solution of a differential equation

m = rand(); k = rand(); syms y(t) Dy = diff(y,t); Dy2 = diff(y,t,2); ode = m*Dy2 + k*y == 0; cond = [y(0) == 1,Dy(0) ==...

Simplifying solution of a differential equation

m = rand(); k = rand(); syms y(t) Dy = diff(y,t); Dy2 = diff(y,t,2); ode = m*Dy2 + k*y == 0; cond = [y(0) == 1,Dy(0) ==...

19 hours ago | 0

| accepted

Answered

Image texture on face vertice 3D Model

If you have empty faces, then nothing can be drawn there. Perhaps you should use boundary() https://www.mathworks.com/help/matl...

Image texture on face vertice 3D Model

If you have empty faces, then nothing can be drawn there. Perhaps you should use boundary() https://www.mathworks.com/help/matl...

20 hours ago | 0

Answered

Can anyone suggest how to change the display allignment in command prompt for seeing list of equations

syms x eq(1,1) = expand((x-1)^2); eq(2,1) = expand((x-1)^10); eq char(eq) arrayfun(@disp, eq)

Can anyone suggest how to change the display allignment in command prompt for seeing list of equations

syms x eq(1,1) = expand((x-1)^2); eq(2,1) = expand((x-1)^10); eq char(eq) arrayfun(@disp, eq)

20 hours ago | 0

Answered

there is error in x1(t)

syms t t0 u(t)=piecewise(t<t0, 0, t>=t0, 1); x1(t)=2*u(t-1)-2*u(t-3); T = 0:1/50:10; X1 = double(subs(x1(T),t0,0)); plot(...

there is error in x1(t)

syms t t0 u(t)=piecewise(t<t0, 0, t>=t0, 1); x1(t)=2*u(t-1)-2*u(t-3); T = 0:1/50:10; X1 = double(subs(x1(T),t0,0)); plot(...

21 hours ago | 0

| accepted

Answered

Changing value when first time a value appears

A=[1; 1; 1; 1; 2; 2; 4; 4; 4; 4] B=[4; 2; 7; 9; 5; 0; 2; 6; 1; 0] [~, ia] = unique(A, 'stable') B(ia) = nan

Changing value when first time a value appears

A=[1; 1; 1; 1; 2; 2; 4; 4; 4; 4] B=[4; 2; 7; 9; 5; 0; 2; 6; 1; 0] [~, ia] = unique(A, 'stable') B(ia) = nan

21 hours ago | 1

| accepted

Answered

Function 'daysact' not supported for code generation.

Correct. That function cannot be compiled. The work-around is to use datetime and subtract. dt1 = datetime('7-sep-2002','Loca...

Function 'daysact' not supported for code generation.

Correct. That function cannot be compiled. The work-around is to use datetime and subtract. dt1 = datetime('7-sep-2002','Loca...

1 day ago | 0

Answered

How could I use display function for this?

If you mean the derivative as in then MATLAB does not have any direct way to display that in any kind of nice format. All it h...

How could I use display function for this?

If you mean the derivative as in then MATLAB does not have any direct way to display that in any kind of nice format. All it h...

1 day ago | 0

Answered

Newton Raphson. How to solve it?

If you are using the symbolic toolbox, then MATLAB has jacobian() Otherwise, you need to estimate the jacobian, which you can d...

Newton Raphson. How to solve it?

If you are using the symbolic toolbox, then MATLAB has jacobian() Otherwise, you need to estimate the jacobian, which you can d...

1 day ago | 0

| accepted

Answered

Can I delete the file mw_4a_config.bin from the licenses folder?

The implication of https://www.mathworks.com/matlabcentral/answers/367213-why-do-i-get-the-error-something-unexpected-occurred-a...

Can I delete the file mw_4a_config.bin from the licenses folder?

The implication of https://www.mathworks.com/matlabcentral/answers/367213-why-do-i-get-the-error-something-unexpected-occurred-a...

1 day ago | 0

Answered

Changing values in a table

No loop should be needed. X = M{:,cl1-1}; M{X == 1, cl1:cl2} = 1;

Changing values in a table

No loop should be needed. X = M{:,cl1-1}; M{X == 1, cl1:cl2} = 1;

1 day ago | 0

| accepted

Answered

How to Use "Ask a Question" Section Correctly?

Use shift-reload to load the page back in, which will update the cached version of the style sheets. You should only have to do...

How to Use "Ask a Question" Section Correctly?

Use shift-reload to load the page back in, which will update the cached version of the style sheets. You should only have to do...

1 day ago | 2

Answered

How to apply a matrix to a function?

No, there is no way to do that. When you create a symbolic function by assignment to a variable indexed with a list of symbols,...

How to apply a matrix to a function?

No, there is no way to do that. When you create a symbolic function by assignment to a variable indexed with a list of symbols,...

1 day ago | 0

| accepted

Answered

How to print full size figure using print command?

print() uses the figure PaperSize and PaperPosition properties to decide what size to output.

How to print full size figure using print command?

print() uses the figure PaperSize and PaperPosition properties to decide what size to output.

1 day ago | 0

Answered

error: 'Inputs must be floats, namely single or double' while trying to solve an ODE having an unknown coefficient.

The function you call for ode*() is permitted to use symbolic expressions internally, but the return value must be completely nu...

error: 'Inputs must be floats, namely single or double' while trying to solve an ODE having an unknown coefficient.

The function you call for ode*() is permitted to use symbolic expressions internally, but the return value must be completely nu...

1 day ago | 1

| accepted

Answered

simple Equation, writing formula

Average is sum divided by two. You do not divide by two.

simple Equation, writing formula

Average is sum divided by two. You do not divide by two.

1 day ago | 0

| accepted

Answered

store the for result to txt file using dlmwrite

you need the -append flag to dlmwrite and you need to write in full rows, not one element at a time.

store the for result to txt file using dlmwrite

you need the -append flag to dlmwrite and you need to write in full rows, not one element at a time.

1 day ago | 0

Answered

Using a Loop to read and store information?

http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F Or potentially you could use a datastore()

Using a Loop to read and store information?

http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F Or potentially you could use a datastore()

1 day ago | 0

Answered

Function inside function using lsqcurvefit

clear all;clc; Okay, so this is a script, not a function. x=[ ]; Ln1=x(1);Ln2=x(2); % necks length S1=x...

Function inside function using lsqcurvefit

clear all;clc; Okay, so this is a script, not a function. x=[ ]; Ln1=x(1);Ln2=x(2); % necks length S1=x...

1 day ago | 0

| accepted

Answered

How to assign voltage levels to bit-groups?

https://www.mathworks.com/matlabcentral/answers/714408-how-to-make-a-4-bits-quantizer-with-15-levels#comment_1258188

How to assign voltage levels to bit-groups?

https://www.mathworks.com/matlabcentral/answers/714408-how-to-make-a-4-bits-quantizer-with-15-levels#comment_1258188

1 day ago | 0

Answered

Why are these MATLAB Functions Called?

num2str() and int2str() should be replaced with sprintf() unless you need the behavior of automatically formatting arrays. I ...

Why are these MATLAB Functions Called?

num2str() and int2str() should be replaced with sprintf() unless you need the behavior of automatically formatting arrays. I ...

2 days ago | 0

Answered

plot field form a orderd vector

lat=[10,11,10,12,13,10] lon=[50,51,52,54,52,51] height=[10,50,120] wind_speed=[7,4,3,2,1,6 ; 8,6,5,4,5,9; 10,8,8,7,6,11] win...

plot field form a orderd vector

lat=[10,11,10,12,13,10] lon=[50,51,52,54,52,51] height=[10,50,120] wind_speed=[7,4,3,2,1,6 ; 8,6,5,4,5,9; 10,8,8,7,6,11] win...

3 days ago | 0

Answered

I tried to convert odes to ss but i have problem//odeToVectorField

Your code had some problems. You were not declaring v as a function. Your definition of eqn3 involved multiplying eqn2 by a v...

I tried to convert odes to ss but i have problem//odeToVectorField

Your code had some problems. You were not declaring v as a function. Your definition of eqn3 involved multiplying eqn2 by a v...

3 days ago | 1

| accepted

Answered

eulergamma throwing an 'Undefined function or variable' error

[Moving down from comment] You have the Maple symbolic toolbox interface to matlab installed. You need to uninstall that interf...

eulergamma throwing an 'Undefined function or variable' error

[Moving down from comment] You have the Maple symbolic toolbox interface to matlab installed. You need to uninstall that interf...

3 days ago | 0

Answered

ignore NaN values in loop

if isempty(A) CC(:,i) = nan; else A = interpft(A, 100); CC(:,i) = A; end Can interpft operate with only one no...

ignore NaN values in loop

if isempty(A) CC(:,i) = nan; else A = interpft(A, 100); CC(:,i) = A; end Can interpft operate with only one no...

3 days ago | 0