Beantwortet
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 -...

mehr als 4 Jahre vor | 0

| akzeptiert

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

mehr als 4 Jahre vor | 1

Beantwortet
\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 ...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 0

Beantwortet
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...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Code following function?
Try this: z = zeros(size(y)); z(y>0) = 1; z(y<0) = -1;

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
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 ...

mehr als 4 Jahre vor | 0

Beantwortet
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...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
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 ...

mehr als 4 Jahre vor | 0

Beantwortet
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...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
Creating Vector using MATLAB
Try Out = mean(X,1); % for row wise mean

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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 ...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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....

mehr als 4 Jahre vor | 0

Beantwortet
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...

mehr als 4 Jahre vor | 1

Beantwortet
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 !

mehr als 4 Jahre vor | 1

Beantwortet
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...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
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,...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 0

Beantwortet
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...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 4 Jahre vor | 0

Beantwortet
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...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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) : ...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
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

mehr als 4 Jahre vor | 2

| akzeptiert

Beantwortet
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_...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
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));...

mehr als 4 Jahre vor | 0

| akzeptiert

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

mehr als 4 Jahre vor | 0

| akzeptiert

Mehr laden