Réponse apportée
Accessing entries of symfun
you can try with formula(): clear all close all clc syms psi(x_1, x_2, x_3) syms E nu u_1 = diff(psi, x_1, 1); u_2 = dif...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
How to solve quadratic equation which includes a vector?
You can try with solve: syms V1 eq = V1^2 - V1*V2 - Q*Z; result = solve(eq,V1);

environ 4 ans il y a | 1

| A accepté

Réponse apportée
How do I plot the following polynomial?
With loop for t=1:1200 Cp(t) = 0.99403+1.671*10e-4*t+ ... % all function end t=1:1200; plot(t,cp)

environ 4 ans il y a | 1

| A accepté

Réponse apportée
How to perform xor operation on an three input binary bits.
a = xor(1,1); %1 xor 1 = 1 b = xor(a,0) %1 xor 0 = 0 %or c = xor(xor(1,1),0)

environ 4 ans il y a | 0

| A accepté

Réponse apportée
Changing values in vector
You can try this code a = abs(randn(1,1000)) cont = 1; while cont < length(a)+1 if(a(cont) < 1 || a(cont) > 10) ...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
How to save in separate variables the new values from a loop?
you just have to save number by number for i=1:length(left) x = left{i}; y = right{i}; y= [nan(sum(isnan(y)),1);y...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
Find the cell which is containing a string
A={'Dimension','Weight','Qty','Thk','Total Price'}; b = strfind(A,'Price') for n=1:length(b) if (~isnan(b{n})) ...

environ 4 ans il y a | 0

Réponse apportée
How to obtain a plot of some complex function with imaginary and real interval
You can separate in real and imaginary components. A example : var = -1.5+0.75i; realCom = real(var); %only real part imagCo...

environ 4 ans il y a | 0

Réponse apportée
How to find a minimum amount of equal adjacent values in an array?
You can test this code with different A matrix: x = 2; % X x 3000 matrix of example % A = ones(x,1000); %there is always erro...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
matlab fuction maximum and minimum
I made a function, I hope help you a = rand(4); %Example of 2D matrix b = reshape(a,1,16); cont = 0; var = zeros(1,length(b))...

environ 4 ans il y a | 1

| A accepté

Réponse apportée
How to find longest sequennce within a character array?
cArr = 'aaabee'; vow = ['a', 'e', 'i', 'o', 'u']; for n=1:length(vow) a = strfind(cArr, vow(n)); %search letter by lett...

environ 4 ans il y a | 0

Réponse apportée
How can I introduce a scatter plot for this?
Espero que esto te sirva :D C= 100; D= 0.1; b= 0.15; m= 0.05; g= 9.81; h= 0.001; yn= 0; vo=0; yo=0; yf=0; i = 1; %Pr...

environ 4 ans il y a | 0

Réponse apportée
Similate single sine wave
I commented in other post, but this is a possible answer: time = linspace(-40,40,2000); %change limits signal = 80*sind(2*180*...

environ 4 ans il y a | 0

Réponse apportée
Loop an if with different parameters
You can use for to graph more than once. for n=1:7 e = -n:-1:-n-3 % e values [-1 -2 -3 -4] e = e'; %[-1;-2;-3;-...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
Why my plot doesn't show the line?
You can use this example: i = linspace(0,100,1000); c = 3*10^8; f0 = 10^9; d0=10^3; f1 = 1./(10*i/(c+10)); fd = f0-f1; ...

environ 4 ans il y a | 0

Réponse apportée
how to make graph for this function
You can use fplot() for example: syms x; y = @(x) abs(x-4)+abs(x^2-5*x+6)-abs(x+4)+4; fplot(y,'LineWidth',3); xlim([-6 12])...

environ 4 ans il y a | 0

Réponse apportée
how can i change Matrix last row with loop?
this can work for n = 2:6 A22 = eye(n, n-1); A21 = zeros(n, 1); A = [A21, A22]; end A = A(1:5,:)

environ 4 ans il y a | 0

| A accepté

Réponse apportée
The minimum value of a matrix array and its index
A = rand(1,5); %example matrix [mini,index] = min(A) %mini= minimum value, index = index of minimum value or A = rand(5) %ex...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
Multiple lines of similar variable names
Maybe you can use "cell" to store your arrays, then when using "filloutliers" you run through it with a "for" and store it in an...

environ 4 ans il y a | 1

Réponse apportée
multiplying matrix by another matrix element and using it in a command
You need matrix T to have the same number of rows or columns as matrix Q Q=[-0.0905 0.0604 0.0301;0.142 -0.239 0.097;0 0 0]; %...

environ 4 ans il y a | 0

Réponse apportée
How i do Taylor series summation method?
I hope it helps you! % Integral syms y; fun = @(y) asin(y); resInt = integral(fun,0,1); % Taylor loop with 80 component ...

environ 4 ans il y a | 0

Réponse apportée
Can I make the matrix of size n with only x elements known and rest all 0?
x = [1 2 3 4] large = 8 x = [x zeros(1,large-length(x))]

environ 4 ans il y a | 0

A soumis


Waveform Fourier series (Formas de onda series de Fourier)
With this function you can obtain components of Fourier series of most commonly waveforms.

environ 4 ans il y a | 1 téléchargement |

Thumbnail

Réponse apportée
How to plot distribution curve of multiple data?
x = [-3:.1:3]; y = normpdf(x,0,1); y2 = normpdf(x,0,0.5); plot(x,y,x,y2) More info:https://es.mathworks.com/help/stats/norma...

environ 4 ans il y a | 1

| A accepté

Réponse apportée
How to add NaN values to a matrix?
A = rand(1,48000) %Matrix of example (1x48000) B = rand(1,48449) %Matrix of example (4x48449) C = [A;B(1:48000)] %You can take...

environ 4 ans il y a | 0

Réponse apportée
How to order matrix
You can change the numeric format in Configuration. Change Numeric format in command Window. I hope it helps

environ 4 ans il y a | 1

Réponse apportée
Multiplying each value of a vector with the corresponding value in another vector?
with loop for for n = 1:length(E) theta(:,n) = E(n)*A(n)*alpha(n)*temp(n) * [-1;1] end or can be: theta(n) = E.*A.*alpha.*...

environ 4 ans il y a | 0

Réponse apportée
Hello, I am trying to plot the fourier series of a function but it doesnt seem to be giving me anything near the graph of the original fuction.
What is the waveform it is supposed to give? Did you try a simpler function? I tried with this code: (Sawtooth wave) t= 0:1e-3...

environ 4 ans il y a | 0

Réponse apportée
How to produce a plot for signals?
t = 0:1e-3:5 %time of sampling x = 2*sin(5*t); %evaluated function plot(t,x); %plot(axis x,axis y) More info: https://es.ma...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
Time Scaling In Discrete Time Signals
n=[-2 -1 0 1 2 3 4]; x=[3 1 0 4 6 2 9]; stem(n,x);hold on; %original n2 = 4*n; stem(n2,x); %x4 n3 = 2*n; stem(n3,x);%x2 t...

environ 4 ans il y a | 0

Charger plus