Answered
Y = X . COS(X) . SIN(X)
syms x %SYMBOLIC TOOLBOX Y = x .* cos(x) .* sin(x) fplot(Y) |or| x= linspace(-100,100,1000) y=x .* c...

8 years ago | 1

Answered
Error in saveas, can't save current figure
Try the full code: x = [2 4 7 2 4 5 2 5 1 4]; bar(x); saveas(gcf,'abc.png') *Remark : Create figure before saving...

8 years ago | 0

Answered
How can I make matrix choose?
>> m=[60;90;90;180;125.3;90;60;45;135] N=zeros(1,numel(m)); % your N should be here instead of this N(m==0 | m==180)=0; ...

8 years ago | 0

| accepted

Answered
Decimal increments in a for loop
z = 1:0.1:100; for i=1:length(z) if z(i)<10 y(:,i) = function of i elseif (10<=z(i))&&(z(i)<50) ...

8 years ago | 0

Answered
how to create a matrix which is difference (like in sets) of antoher 2 matrix
a=[2:4] b=3 C=a(a~=b) |OR| C = setdiff(a,b)

8 years ago | 1

| accepted

Answered
can u help me with Maclaurin series expansion
See <https://www.mathworks.com/matlabcentral/answers/363582-how-to-write-the-summation-of-the-maclaurin-series-of-cos-x#answer_2...

8 years ago | 0

Answered
Looping matrice column by subtraction
*EDIT 2* a = randi([0 9],84,7) %fake data to test a1=a(:,2) %column you want to extract a2=a(:,5) %column you want...

8 years ago | 0

| accepted

Answered
Why I am not getting Identity matrix on performing this function?
a=[1:3;4:6;7 8 10] p = a*inv(a)

8 years ago | 0

| accepted

Answered
Solve function doesn't run
you have a file name called as solve.m please delete it , contradicts with the matlab's inbuilt function solve Type wh...

8 years ago | 1

| accepted

Answered
legend for circle matlab
R = 10; x_c = 5; y_c = 8;thetas = 0:pi/64:pi; xs = x_c + R*cos(thetas); ys = y_c + R*sin(thetas);%create input data % No...

8 years ago | 1

| accepted

Answered
Axis tick numbers in descending order
xticklabels([1:10]) %an example set ( gca, 'xdir', 'reverse' )

8 years ago | 0

| accepted

Answered
How to extract rows from a large number of rows that matchs a unique element in the column
>> matrix = [ 1 10.1 100 100 2 200 0.1...

8 years ago | 0

| accepted

Answered
Determine decay order of a plot
To view the equation read *<https://www.mathworks.com/help/matlab/data_analysis/interactive-fitting.html>* see 4th sentence unde...

8 years ago | 0

Answered
help understanding matlab codes in details
Use a cheat sheet <https://www.dummies.com/programming/matlab-for-dummies-cheat-sheet/> faster to understand

8 years ago | 0

Answered
hello .please i need to integrat this equation " dV=[1/(1+n^2 .S .V .(1-exp⁡(-n^2 . S .V)) ] dS " but with matlab but it dosn't work and i don't know wath is the solution for this.
>> syms s v n f = 1/(1+n^2.*s.*v.*(1-exp(-n^2.*s.*v))) int(f,s) f = -1/(n^2*s*v*(exp(-n^2*s*v) - 1) - 1...

8 years ago | 0

Answered
plotted 3 graph, only 2 shown up
Try: syms x y v = 5 - x - y; a = 8 - 2*x - y; w = 8 - x - 2*y; h=ezplot(v); h.Color='g' ...

8 years ago | 0

Answered
How to find all solutions to a function?
syms y f = 1.1^2+y.^2-1-4.5*(sin(1.1.*y)).^2 fplot(f) hold on fplot(subs(y,0)) root1 = vpasolve(f,[-2 -1.5]...

8 years ago | 0

Answered
plotting roots of a polynomial
syms v syms T Tc=96.15+273 %K Pc=4990; %KPa R=(8.314/86.47) Ta=100 omega = 0.22082 b=(0.0778*R*Tc)/(Pc...

8 years ago | 0

| accepted

Answered
combining vectors of varying lengths
time(:) %transforms into. column vector

8 years ago | 0

Answered
finding the roots of a cubic equation
syms v syms T Tc=96.15+273 %K Pc=4990; %KPa R=(8.314/86.47) Ta=1400 a=(0.42748*R*R*Tc^2.5)/(Pc) b=(0....

8 years ago | 0

| accepted

Answered
I have this script to plot the solution to damped oscillator but when i run it it says undefined function or variable. What am I missing?
%SCRIPT FILE tspan=[0 5]; y0=[0,0]; [t,y]=ode45(@forced, tspan,y0); plot(t,y(:,1)); grid on xlabel(...

8 years ago | 0

| accepted

Answered
replace a double in a array with a string BUT in specific Columns?
>> AA = string([ 0.5 2 3 2.5 1 1 0.6 1 2 2.4 2 3 0.2 2 3 2.3 3 2]) A = strrep(AA(:,[2 3 5 6]),'1'...

8 years ago | 1

| accepted

Answered
I want to find indexes for maximum and minimum
findpeaks(-Ry2); %see carefully I added minus sign in front of Ry2

8 years ago | 0

| accepted

Answered
converting octave to matlab
Try the fileexchange: <https://in.mathworks.com/matlabcentral/fileexchange/8972-oct2ml>

8 years ago | 0

Answered
how can I plot values from diffrent runts into the same graph
use : hold on after plot command

8 years ago | 0

Answered
Is there any way to convert a mathematica code to matlab code?
*Try:* <http://library.wolfram.com/infocenter/MathSource/577/>

8 years ago | 0

| accepted

Answered
How to show function is converging towards a point or not.
syms n x k assume(0<k<1) %openinterval assumeAlso(0<=x<=k) %closedinterval F= (n.*x)./(1+(n.*x).^2) limit(F,n,in...

8 years ago | 1

| accepted

Answered
How to apply for loop for specific files of each subfolder and record maximum value in matrix form?
see *<https://in.mathworks.com/matlabcentral/answers/274931-reading-data-files-within-a-subfolder-of-the-search-path#comment_352...

8 years ago | 0

Load more