Answered
How to rotate RECTANGLE?
Not exactly, but there is a way. h = rectangle('Position',[0 0 2 4],'Curvature',1); g = hgtransform('Matrix', makehgtform('z...

4 years ago | 0

| accepted

Answered
How can I solve this problem?
f = @(x) 2.^x; Note: f_prime1 = @(x) 2.^x; That is not the derivative of 2^x syms x diff(2^x, x) diff(ans, x)

4 years ago | 1

| accepted

Answered
Summation function with two variables concentration profile
D=1.79e-5; C1=0.79; C0=0; l = 120/2; x=linspace(-l,l,1000); n=linspace(0,.020,1000).'; t=linspace(0,1,1000).'; ax1=(...

4 years ago | 0

| accepted

Answered
Cell array use, indexing and slicing in parallelization
Inside the parfor loop, you can write to local variables all you want, but sometimes parfor will require you to clearly initiali...

4 years ago | 0

| accepted

Answered
Alternative to writecell?
https://www.mathworks.com/help/matlab/ref/xlswrite.html#btmdr27-1-A xlswrite() can write cell arrays in which each cell entry c...

4 years ago | 1

| accepted

Answered
How to use matlab engine on python without install matlab?
https://www.mathworks.com/help/matlab/matlab-engine-for-python.html Engine applications require an installed version of MATLAB...

4 years ago | 0

Answered
Finding the maxima/minima
[tmin, fmin] = fminbnd(f,0,2*pi) nf = @(x)-f(x); [tmax, fmax] = fminbnd(nf,0,2*pi)

4 years ago | 0

| accepted

Answered
implement the distance transform algorithm by City-Block distance measurement
City block transform between rows of P1 and corresponding rows of P2 is CB = @(P1, P2) sum(abs(double(P1)-double(P2)), 2)

4 years ago | 0

Answered
how to plot contour function
xvec = linspace(0, 5, 25); yvec = linspace(-3, 3, 25); [X, Y] = meshgrid(xvec, yvec); T = X .* exp(Y); surf(X, Y, T, 'edge...

4 years ago | 0

Answered
find unique words in a 54x1 cell array
states = {'red', 'yellow', 'green', 'blue', 'cyan', 'blue', 'yellow', 'green', 'orange'} unique(states) length(ans)

4 years ago | 1

Answered
solving an ODE with a constraint equation
Typically this would be solved as a Boundary Value Problem, such as bvp4c() or bvp5c()

4 years ago | 0

Answered
I have make surface plot with x, y and z data but getting reshape error
x=[ 10 21 29 39 52]; y=[ 143.44 130.4 134.89 123.71 130.4]; z=[ 93.66 107.1 102....

4 years ago | 0

| accepted

Answered
Serial Command Not Working!
The command to display the serial ports is serialportlist You can be more specific too, serialportlist("all") serialportlist...

4 years ago | 0

Answered
My code doesn't run
MATLAB has polylog() but not poliLog()

4 years ago | 0

Answered
Is There a Way to disp a sym Double Subscript?
No, there is no way to do that at the moment. https://www.mathworks.com/help/symbolic/add-suffixes-to-symbolic-results.html ...

4 years ago | 0

| accepted

Answered
Can I partition a matrix ito several seperated parts ?
A = [2;2;-3;4;5;6;7;-8;9;-6;5;4;-2;1;3;-9;8;7;4;-5;6;3;2;-1;4;-7;-8;5;-6]; parts = mat2cell(A, [7, 7, 7, 8], 1); [B, C, D, E...

4 years ago | 0

Answered
ode45 needs to return a column vector
Q = [1 0; 0 1/2]; R = 1/4 A = [0 1; 2 -1]; B = [0; 1]; tspan = [5 0]; P0 = 0; P = ode45(@(t,P) odefun(t,P,Q...

4 years ago | 0

Answered
MS Visual Studio C 32 bits mxArray DLLs for the interface to MATLAB 64 bits
This is an operating system limitation. The only operating system that I can recall ever having the ability to call to a lowe...

4 years ago | 0

| accepted

Answered
how to save number of organization for each cluster in k mean clustering.
radius=15; X0=0; % x-coordinate of Centre of the circle Y0=0; % y-coordinate of Centre of circle % Users K=4; t = 2*p...

4 years ago | 0

| accepted

Answered
Change table variable type
You need to replace the entire varible using dot syntax. For example, tbl1.x1 = double(table1.x1); to do that for several vari...

4 years ago | 0

| accepted

Answered
cell array conversion included cells and tables
temp = rqa_stat; tmask = cellfun(@istable, temp); temp(tmask) = cellfun(@table2array, temp(tmask), 'uniform', 0); Now temp is...

4 years ago | 0

| accepted

Answered
Mapping arrays with varying precision values to an array with consistent precision values and their effects on dependent arrays
discretize https://www.mathworks.com/help/matlab/ref/double.discretize.html to get bin numbers, and use those to accumarray() to...

4 years ago | 0

| accepted

Answered
Getting warning while running the attached code!!
That is not an error.. but it can be a nuisance. format long g syms x E = 30e3; s_u= 114; k_p = 154; n_p = 0.123; s_f_p =...

4 years ago | 0

| accepted

Answered
How to delete all rows of an array that have a specified number in a particular column?
A(:, A(2,:) == 5) = [];

4 years ago | 0

| accepted

Answered
How do you vertically concatenate the rows of a cell array consisting of vectors of numbers?
Output = arrayfun(@(ColIdx) vertcat(YourCell{:,ColIdx}), 1:size(YourCell,2), 'uniform', 0);

4 years ago | 0

Answered
How do I use a function from File Exchange?
Use the Add-on Explorer to install the File Exchange contribution. I checked the contribution. Some of the files define scrip...

4 years ago | 0

Answered
How to filter a signal that just some special frequencies can be passed?
fft() it with the number of points set such that all three frequencies correspond to integer multiples of the sampling frequency...

4 years ago | 0

Answered
Matlab app designer run time
The run-time is fixed size. However the code will be compiled into a data file and the data file will vary in size.

4 years ago | 0

Answered
How to read a set of numerical characters for time and date
format long g timechar = {'14442940912210', '14443040912210', '14443140912210', '14443240912210'}; parts = regexp(timechar, '^...

4 years ago | 0

Answered
the meaning of a sentence in command window
If your function truly is a quadartic function of one variable, then: Evaluate the function at several different x values (at l...

4 years ago | 0

Load more