回答済み
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 -...

4年以上 前 | 0

| 採用済み

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

4年以上 前 | 1

回答済み
\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 ...

4年以上 前 | 0

| 採用済み

回答済み
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...

4年以上 前 | 0

回答済み
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...

4年以上 前 | 0

| 採用済み

回答済み
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...

4年以上 前 | 0

| 採用済み

回答済み
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...

4年以上 前 | 0

| 採用済み

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

4年以上 前 | 1

| 採用済み

回答済み
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 ...

4年以上 前 | 0

回答済み
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...

4年以上 前 | 1

| 採用済み

回答済み
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 ...

4年以上 前 | 0

回答済み
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...

4年以上 前 | 1

| 採用済み

回答済み
Creating Vector using MATLAB
Try Out = mean(X,1); % for row wise mean

4年以上 前 | 0

| 採用済み

回答済み
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...

4年以上 前 | 0

| 採用済み

回答済み
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 ...

4年以上 前 | 0

| 採用済み

回答済み
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....

4年以上 前 | 0

回答済み
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...

4年以上 前 | 1

回答済み
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 !

4年以上 前 | 1

回答済み
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...

4年以上 前 | 1

| 採用済み

回答済み
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,...

4年以上 前 | 0

| 採用済み

回答済み
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...

4年以上 前 | 1

| 採用済み

回答済み
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...

4年以上 前 | 0

回答済み
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...

4年以上 前 | 0

| 採用済み

回答済み
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...

4年以上 前 | 0

回答済み
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...

4年以上 前 | 0

| 採用済み

回答済み
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) : ...

4年以上 前 | 0

| 採用済み

回答済み
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

4年以上 前 | 2

| 採用済み

回答済み
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_...

4年以上 前 | 1

| 採用済み

回答済み
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));...

4年以上 前 | 0

| 採用済み

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

4年以上 前 | 0

| 採用済み

さらに読み込む