Answered
Too many symbolic variables using fplot
syms t w_1 w_2 real x_t = 1.2*cos(w_1*t - 0.85) + 0.35*cos(w_2*t + 0.75) w_1 = 0.85 w_2 = 0.20 x_t=subs(x_t) fplot(x_t,[0, ...

7 years ago | 0

| accepted

Answered
check if elements in an array are equal to 0 1 or 2
a=randi([0 2],2) unique(a(:)) %returns unique numbers in a matrix

7 years ago | 0

Answered
Executing independent scripts sequentially
P.S - Just a try for i =1:3 s(i)=sprintf('script%d',i) if s(i)==l %add l=2 to the end of each script to make sure ...

7 years ago | 0

Answered
do you guys have any suggestion on how to plot/illustrate a gearbox and have it as an output of a function using MATLAB?
https://www.mathworks.com/matlabcentral/answers/327224-how-to-create-a-more-accurate-gearbox-following-from-the-powertrain-matla...

7 years ago | 0

| accepted

Answered
Changing Matrix to Row
m=[ 0 0 10928 0 6928 4000] m=m' m=m(:).'

7 years ago | 0

| accepted

Answered
How to interpolate for a particular index within vector?
EDITED y=load('ICE.mat'); x=linspace(2,6,15); yy=interp1(y.DrehmomentICE1(15:30),x) %interpolated values like this?

7 years ago | 0

Answered
Write equation on axis label
xlabel('${\it} (A^{2}/B)^{1/4}$','Interpreter','Latex')

7 years ago | 2

| accepted

Answered
Inline ; use anonymous functions instead.
see inline() input should be a string cf=input('ingrese funcion a evaluar: ','s'); derivada=diff(str2sym(cf),x); %change thi...

7 years ago | 0

| accepted

Answered
assign the same vector to be the same cell
A=[1 2;1.1 2;1.2 2;1 3;1.1 3;1.2 3;1 4;1.1 4;1.2 4]'; group=reshape(A,2,3,3); CELL=cell(1,3); for i = 1:size(group,3) CELL{i...

7 years ago | 0

| accepted

Answered
Merging two figures to a single figure
https://www.mathworks.com/matlabcentral/answers/3901-merging-two-figures#answer_5586

7 years ago | 2

| accepted

Answered
Which function should I use here to group my matrix?
Use sortrows() A = [1 0 0; 2 0 0; 1.1 0 0; 2.1 0 0; 1.2 0 0; 2.2 0 0] ...

7 years ago | 1

| accepted

Answered
Display Output in Command Window
clear all %at the very beginning of the code and try again there might be some file ,variable or function with the name format ...

7 years ago | 0

Answered
how to plot 4 dimensional data?
Read about isosurface.

7 years ago | 0

Answered
Plotting for loop data
Use iterator as an index so that overwriting is avoided. Plus upload your code intead of picture next time onwards.

7 years ago | 0

Answered
Could anyone help me how to write the legend data in single line
see Legend Location and Number of Columns plot(rand(8)) lgd = legend({'number','digits','symbol','units','integers','alpha','b...

7 years ago | 2

Answered
Summation Problem With Error
x is only defined as a scalar value which is zero so when you try to acess 2nd element it gives an error. Cumsum/symsum is recom...

7 years ago | 0

Answered
help please ! I want to create two random sine waves in the same figure with their amplitude between -5 and 5 having at least 4 maximums
see piecewise syms y(t) y=piecewise(0<=t<1,5*sin(t),1<=t<2,4*sin(t),2<=t<3,3*sin(t),3<=t<4,-2*sin(t),4<=t<5,sin(t),5<=t<6,3.5*...

7 years ago | 0

Answered
Creating spherical surfaces in 3d
Have a look at sphere()

7 years ago | 0

Answered
How can I use a vector inside integral?
Use integral() with arrayvalued method as suggested in the link

7 years ago | 1

| accepted

Answered
Error: "Undefined variable 'LibraryBrowser' or class 'LibraryBr​owser.Stan​daloneBrow​ser'" after migrating from MATLAB R2014a to R2015b
Might help https://www.mathworks.com/matlabcentral/answers/254494-error-undefined-variable-librarybrowser-or-class-librarybrowse...

7 years ago | 0

Answered
how to select choose only two place after a decimal point in a equation file.
y = 2.35363 +a(7.636436356) y = vpa(y,2)

7 years ago | 0

Answered
How can I create a for loop to count the number of letters in my array?
Stephen's way is efficient but if you insist loop then: bases = 't t g c g c a t g c g c a c a' ctr=0; for i = 1:numel(bases)...

7 years ago | 0

| accepted

Answered
how to solve the implicit equation for N=8, exp(-L)=L/N, find L
Use vpasolve() and declare L as syms L (requires symbolic toolbox) at the beginning and solve it's not hard

7 years ago | 0

| accepted

Answered
datestr problem with month
Use datetime str='04/04/2018' Date= datetime(str,'format','dd/MM/yyyy')

7 years ago | 0

Answered
combine two matrices to get another matrix of same size
>> a=string([1,2;3,4]); b=string([5,6;7,8]); c=str2double(strcat(a,b)) c = 15 26 37 48 >>

7 years ago | 1

| accepted

Answered
Find number of vowels
s=input('Insert a word: ', 's'); Number_of_vowels = vowelcounts(s) %function calling function w = vowelcounts(s) %fu...

7 years ago | 1

| accepted

Answered
how to concatenate two audio files of different matrix dimensions?
To perform this operation size(y1(1:q*10,:)) size(y2) and size(y1(q*10+1:end)) have to be the same - imagine if a matrix has une...

7 years ago | 0

Answered
Array of U1 V1 U2 V2 U3 V3
https://www.mathworks.com/matlabcentral/answers/427731-how-can-i-generate-a-matrix-of-symbolic-functions-whose-size-varies-depen...

7 years ago | 0

| accepted

Answered
Plot data with different colors and line styles
See markers

7 years ago | 0

Load more