Answered
how to reshape 3d matrix?
If the below doesn't do what you want , give an example of a short 3D matrix and the desired output permute(yourmatrix,[2 3 1])...

7 years ago | 1

| accepted

Answered
Swap the first and last columns
A=rand(4) % example matrix B = swap_ends(A) % function call function B = swap_ends(A) % function definition ...

7 years ago | 1

Answered
How do I place each answer under a one column matrix?
r = [1, 2.5, 3.25, 4.3, 7.6]; h = [12.3, 14.1, 17.6]; j =1; vol=zeros(15,1); % preallocate for i = 1:length(r); ...

7 years ago | 1

| accepted

Answered
How can I use fprintf to print indexes of a matrix?
You might also want to look at uniquetol() . Note: If only your condition is met B gets filled with certain numbers else they a...

7 years ago | 0

Answered
How can I use fprintf to print indexes of a matrix?
B(i,j) not B(k,1)) likewise for the rest

7 years ago | 0

Answered
Find the min(or max) of the 2nd row of an unknown matrix?
[value,index]=max(A(2,:)) [Value,Index]=min(A(2,:))

7 years ago | 1

| accepted

Answered
why is not possible to do the logic also why not display
P.S - you get an error because L is of symbolic class because you have added (u.mm) unit which belongs symbolic math toolbox , j...

7 years ago | 0

| accepted

Answered
i need matlab code
doc cumsum doc symsum

7 years ago | 0

Answered
Plot without axis but with background
t=0:0.1:10; hFig = figure; y=sin(t); plot(t,y); color = get(hFig,'Color'); set(gca,'XColor',color,'YColor',color,'TickDir',...

7 years ago | 1

| accepted

Answered
Fourier transform how to get coefficients
real() imag()

7 years ago | 0

Answered
How does one store all the words from a loop into a variable?
You can store them as cells like below: RandomWordsA=cell(1,numel(wordsA)); for i = 1:length(wordsA) PositionA = Shuffl...

7 years ago | 0

| accepted

Answered
Why matlab not simplify my answer?
D=vpa((W*L^3)/(8*E*I))

7 years ago | 1

| accepted

Answered
writing variable in xls file
xlswrite('sample.xlsx','abc')

7 years ago | 0

Answered
Finding a vector as a subset of an array
a = [2 2]; b = [2 3]; idx=ismember(b,a); all(idx) % if zero then b doesn't contain all the elements of a else vice vers...

7 years ago | 0

Answered
Change the output Y-labels in a figure of a multi-output dynamic system
ylabel(...) after each subplot

7 years ago | 0

Answered
I am writing an FEM code for a curved box girder bridge and getting an error..Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 9.359430e-32. > In Dec14 (line 579)
https://www.mathworks.com/matlabcentral/answers/99745-why-do-i-get-warning-message-matrix-is-close-to-singular-or-badly-scaled#a...

7 years ago | 0

Answered
Hi, I tried to use fmincon but I received the message. How should I do
https://in.mathworks.com/help/optim/ug/when-the-solver-fails.html

7 years ago | 0

Answered
Get the probability of a matrices
mat=tblB.Symbol./sum(tblB.Count) %though the pattern is not discernible

7 years ago | 0

| accepted

Answered
plot solution of linear systems (linsolve)
doc syms doc fplot doc equationsToMatrix doc linsolve doc plot % see how to plot a single point especially markers doc lege...

7 years ago | 0

Answered
How can I evaluate the double integral of a piece-wise function and get a numerical answer, instead of the rewritten integral?
int() is a symbolic integrator which finds it difficult to evaluate the integral so it’s handed over to the numerical integrator...

7 years ago | 0

Answered
I use Matlab2018b on iOS. csvread does not work. file not found
Processing sequence of files (use xlsread() or readtable() to read the file)

7 years ago | 0

Answered
license manager error -103
https://www.mathworks.com/matlabcentral/answers/91874-why-do-i-receive-license-manager-error-103#answer_101225

7 years ago | 0

Answered
i am getting an error stating not enough input arguments someone please check through it for my mistakes
You didn’t define the input arguments before calling the function.

7 years ago | 0

Answered
Can anyone please explain this? I tried to implement this code on Matlab, but the graph is blank. I do not know what I did wrong.
Loop is superfluos here , the reason for your error is you forgot to save the variables in each loop iteration (you overwrote) ,...

7 years ago | 0

| accepted

Answered
plot the integral of function
If you want specific help post what you tried: fun = @(theta).... your function without integral integral(fun,0,pi/2)

7 years ago | 0

| accepted

Answered
Solving a second order differential equation with matlab.
syms y(x) dy=diff(y); dy2=diff(y,2); omega=5; %your value acheived by 2*pi*(f0/fs) formula ode=y == x + 2*cos(omega)*dy-dy2 ...

7 years ago | 1

| accepted

Answered
How to plot a specified point in a plot?
plot(corresponding_x_value,1.2,'ok')

7 years ago | 0

Answered
Not enough input arguments ode45
% Main program s0=1; c0=0; t=linspace(0,0.01,100); x0=[s0 c0]; % Main program [t,x]=ode45(@(t,x) num_lsg1(t,x), t, x0); ...

7 years ago | 0

| accepted

Answered
How can I use 'deembedsparams' function with two input?
[ ]

7 years ago | 0

| accepted

Answered
Delivery of variables in function and fsolve afterwards doesn't work
To pass in parameter parameterize your function(lookup in documentation) %myfuncall.m x0=[0 0]; A=3; B=4; x=fsolve(@(x)myf...

7 years ago | 1

| accepted

Load more