Réponse apportée
Find empty cells in 3D cell?
Try this: [r,c] = find(cellfun(@isempty,channelResp)); [nR,nC,nD] = size(channelResp); Dep = floor(c/nC-0.0001)+1; Col = c -...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How to do function shift in MATLAB?
Try: function [ func_up ] = FuncShift( func, shift ) func_up = @(x)(func(x)+shift); end

plus de 6 ans il y a | 1

Réponse apportée
\graphing witth multiple functions
Try : a = gca; hold on plot(a.XLim,[560, 560],'m--') % plots horizontal line at y = 560 To find the intersection point at y ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How to find the nth is the higher than and closest to 0.3
One of the several ways: A=[5 56 6.1 0.29 0.32 15 ]; [vec,ind] = sort(A); id = find(vec>0.3,1); rqd_value = vec(id) % Requi...

plus de 6 ans il y a | 0

Réponse apportée
Plotting multiple 3D plots on one graph
Try : figure (4) grid on hold on % Hold position should be at the start of plotting to overlap plots plot3(cm_willans,pma_14...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Specifying the colour of a scatter plot
Try: scatter (x, y, 'filled', 'MarkerEdgeColor',[255, 66, 0]/255, 'MarkerFaceColor',[255, 66, 0]/255); to change tick labels f...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How to convert time domain to frequency domain
Replace the following line : subplot(2,1,4);plot(t,z); figure; by the following code nfft = length(y); f = (0:1/nfft:1-1/nf...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Code following function?
Try this: z = zeros(size(y)); z(y>0) = 1; z(y<0) = -1;

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
how to find the eigen value and plot them?
To find the eigen values you can use : e = eig(A); help eig % for more information on eigen function and how to use it and ...

plus de 6 ans il y a | 0

Réponse apportée
Low, High, and Band pass filter
Assuming you can interpolate the data and make altitude to vary at fixed step of 0.02 km and 1km equivalent to 1sec. To make bu...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
matrix dimension must agree
In line, tl=(0:L-1).*Ts; Ts is of dimension 1x199 and you are muliplying it with a vector of dimesion 1x1500. Since, you are ...

plus de 6 ans il y a | 0

Réponse apportée
Calculate continuous Fourier Series for 50 coefficients
Try this : r = @(x)0; f = @(x) cos(3*x) - 0.5*sin(5*x) + 0.05*cos(54*x); a0 = (1/pi)*integral(f,-pi,pi); a50 = @(x) (1/pi)*i...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Creating Vector using MATLAB
Try Out = mean(X,1); % for row wise mean

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How do I fix this code to get a proper moving average plot?
Your basic function 'running_avg' seeems to be working perfectly. However, If you want answers exactly as you would get using mo...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How to find the index in a row vector where a number exceeds a certain value?
Try : A = 1:100; lim = 50; ind = find(A>lim,1); %% Here 1 after comma suggests the first element that is greater than 50 In ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Labels dont show up
One way to do this : f = @(t,y) t*y-y; y0 = 0.5; t = 0:0.2:1; [t,y1] = euler(f,t,y0); plot(t,y1,'DisplayName','Euler 0....

plus de 6 ans il y a | 0

Réponse apportée
Why in the for cycle the values of the first row of the matrix y(i,j) don't exist?
I think FUNCTIONALITY13 is being updated after each i, so FUNCTIONALITY13 is not storing all the values as matrix. You might w...

plus de 6 ans il y a | 1

Réponse apportée
Creating a graph of sin(x) and the taylor series for its approximation
Change the line x=linspace(0,100,2*pi); by x=linspace(0,2*pi,100); I hope it helps !

plus de 6 ans il y a | 1

Réponse apportée
Surf plot using meshgrid
Try this : snr_data = xlsread('snr values.xlsx'); depth = [1,2,3,5]; level = 1:7; depth_mesh = meshgrid(depth,level).'; lev...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
resistors in a circuit
Try this : r3 = 100; % for example Volt_func = @(r)1.24*(r(1)*r(2)+r(2)*r3+r3*r(1))/r(1)/r(2); rout = lsqnonlin(Volt_func,...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How to implement a formula involving several elements of the same vector?
There are several way to do this, but most basic would be to use 'for' loop to get the feeling of how Matrix indexing works: Pe...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
how to call multiple access file from one folder in matlab
One of the several ways to do this : clear all, close all, clc PathName = 'C:\Users\.......\0 degree\'; % Set the path where f...

plus de 6 ans il y a | 0

Réponse apportée
Index exceeds matrix dimensions.
P2 is an array of dimesion 1x199 and L=1500. So, when you write : P1=P2(1:L./2+1); that means P1 = P2(1:751); So, indeces of...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
convert min, hours to 00:00:00 format
Use datestr() to convert number to time x = 15; if x>=60 out = datestr(x/24/60,'HH:MM:SS') else out = datestr(x/24...

plus de 6 ans il y a | 0

Réponse apportée
How to solve two differential equations using ode45
Are you sure, e1,e2,c1,c2 are time-variant and not constant ? If they are time-variant then there should be differential terms o...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How do I plot every 10th row of data?
One way to do this efficiently would be to scan the data inside the file at once (instead of doing it one by one in a loop) : ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
how do I insert a custom power curve?
Looks like a "1-D Lookup Table" block in simulink. For more details refer to following link : 1-D Lookup Table

plus de 6 ans il y a | 2

| A accepté

Réponse apportée
How can I fill an array with varying input dimensions and data type change?
Try this: last_digit_vec = mod(Generator,10); v = {}; for i = 1:length(Generator) v = [v,eval(['mod',num2str(last_digit_...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
how to use the row&column indices returned by find to control array element in matrix way
One of the way could be to use absolute indexing of X matrix : ind = find(X==1); ex(ind)=ex(ind)+0.5*(data(ind)-data(ind-je));...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
check inside cell condition
Try this: for i = 1:length(AppleDECB) if ~ischar(AppleDECB{i}) % check if cell doesn't contain char continue; ...

plus de 6 ans il y a | 0

| A accepté

Charger plus