回答済み
An unexpected discrepancy between xcorr, xcov and autocorr
When in doubt always read the documentation. doc xcov Matlab functions are very good documented. For example, you can read: x...

1年以上 前 | 0

回答済み
Why I couldn't plot this graph f=(@(x,y) (x.^2)+(x*y)+(y.^2)<=68200.^2/3);
And if you really insist on 68200^2/3, then this code will provide output f=@(x,y) x.^2+x.*y+y.^2-68200^2/3; fimplicit(f, 'b'...

1年以上 前 | 0

回答済み
Can I make this line of code smaller?
XBest=[2, 3, 4]; XBest(isempty(XBest)) = 1e8; XBest XAest = []; XAest(isempty(XAest)) = 1e8; XAest

1年以上 前 | 1

| 採用済み

回答済み
Why the 2nd code does not behave like the 1st code?
This is how I would modified the code to execute for any M r N dimensions: clear clc u = [10 20 30 40]; b = u * (1+0.5*randn...

1年以上 前 | 1

| 採用済み

回答済み
Unable to perform assignment because brace indexing is not supported for variables of this type
You need to provide more context. For example, this is OK. run = cell(10,1); R = 244:300; Y = 1:300; run{1} = Y(1:R(1)) ru...

1年以上 前 | 0

回答済み
How to get subset of data from given thresholds?
Did you try this approach? DNS = dat(:,9); NZE = dat(:,10); PER = dat(:,11); % 1. sub = dat(NZE>0.25,:); %2. sub = da...

1年以上 前 | 0

| 採用済み

回答済み
How to read a specially structured data file with different structures
I would suggest the follwoing solution: A = readtable('test.5p', 'ReadVariableNames', false, 'FileType', 'text'); nr_rows = si...

1年以上 前 | 1

| 採用済み

回答済み
Why the 2nd code does not behave like the 1st code?
It is because in the function "myfunAskMathworks.m" you have function handles defined. So, you are sending the function handle a...

1年以上 前 | 1

回答済み
How to read a specially structured data file
I would also like to suggest my naive and inefficient approach: A = dlmread('testfile5p.txt'); nr_rows = size(A,1); A2 = zero...

1年以上 前 | 1

回答済み
how to plot a mean line in a plot
Perhaps, you can use this code: plot(t1,x.*t1);

1年以上 前 | 1

回答済み
Hi! How I can extract specific data
Hello Aknur, This example code will perform task you specified. % code which will take exactly data where the last three % ...

1年以上 前 | 0

| 採用済み

回答済み
Solving a system of equations with dependent variables symbolically
syms a b c d x z y s sol = solve([y==a*b-c,z==d*a+b,x==c*a+b,s==c*b-a],[a,b,c,d],'Real',true) sol.a, sol.b,sol.c, sol.d

1年以上 前 | 0

| 採用済み

回答済み
I would like to count the number of peaks of a signal.
t = 0:0.01:2; y = sin(20*t); [z, ind] = findpeaks(y); plot(t,y) hold on plot(t(ind), z, 'o') number_cylces = numel(diff(...

1年以上 前 | 1

回答済み
reorder data in a matrix
It seems to me that you want this logic implemented: A = ["10010" ; "11000" ; "11010" ; "01100" ; "01011"] N = numel(A); B =...

1年以上 前 | 0

回答済み
How to know the data set after augment?
This is an extract from the documentation: % transform Create a new datastore that applies a function to the % data rea...

1年以上 前 | 0

回答済み
Intersection of two tables
Maybe this code can help you: A = table(); A.user = {'user1';'user2';'user3';'user4'}; A.value = [10;20;30;40] B = table()...

1年以上 前 | 0

回答済み
Problems using Linear Regression and syntax
Can you clarify what exactly is the problem with Matlab syntax? Here is what is obtained if your code is executed: clear clc ...

1年以上 前 | 0

回答済み
What is the answer of [(4 -2 ) /2 , 5 +6 , 7 , 8 ] ? Why does MATLAB output [1 5 6 7 8]?
In Matalb, when you define an array (or vector) you can use the following syntax: v = [1 3 4 5 6] This is exactly the same as:...

2年弱 前 | 0

回答済み
Error using Solve with symmatrix equation
The function solve doesn'tsupport symmatrix. One way to solve matrix equeation is the follwoing: A_r = [3 -6; 5 2]; B_r = [7 4...

2年弱 前 | 0

| 採用済み

回答済み
Creating a matrix based on sorted values from another matrix
[As, ind] = sort(A); C = [As;B(ind)]

2年弱 前 | 0

| 採用済み

回答済み
How to have two legends on the same plot?
Perhaps you meant this: t = 0:0.1:5; y = sin(t); z = cos(t); figure; hold on; for i = 1:2 p1(i) = plot(t, y,'r'); ...

2年弱 前 | 2

回答済み
why do i get the error using alpha too many output arguments, can anyoen help please.
You didn't define variable alpha. Because of that, Matlab thinks you want to use built in functionality: help alpha alpha - Ge...

2年弱 前 | 0

回答済み
How to remove noise (unwanted data)
I would suggest the following approach: % read file into table %T = readtable('KLOG0024.csv'); outfile = websave('KLOG0024.cs...

2年弱 前 | 1

回答済み
Invalid indexing or function definition. Indexing must follow MATLAB indexing. Function arguments must be symbolic variables, and function body must be sym expression.
If you want to define equations eq1, eq2 and eq3, you need to use function handles: syms v2 v3 I2 v1 = 20; del_t = 0.5; R = ...

2年弱 前 | 1

| 採用済み

回答済み
Help implementing code (Newton-Raphson)
@Allan I would like to suggest somewhat simpler code: maxIter = 200; maxTol = 1e-14; V0 = linspace(0, 10, maxIter); % para...

2年弱 前 | 0

| 採用済み

回答済み
Index error: must be logical or positive integer.
T=10:2:60; f=-1:length(T)+1; total=-1; i=f+total; et=3.5e-4; dn1=1e-9:100e-9; size(dn1) size(i) if i==0 r=0; else ...

2年弱 前 | 0

| 採用済み

回答済み
Array indices must be positive integers or logical values.
It seems to me that you actually want this: [t,y]=ode45(@problem03ODEFunction,[0 20],[2 0 0]); plot(t,y(:,1)) hold on; gri...

2年弱 前 | 1

回答済み
HPF doesn't work in time-domain convolution
Please have a look at this code. This is to confirm that multiplication in freq. domain and convolution in time domain will prov...

2年弱 前 | 0

回答済み
how do i write a matlab script to sum this expression
Matlab has a built in function called rmse, so there is no need to write a Matlab script, unless this is a homework. In that cas...

2年弱 前 | 0

回答済み
Compare of symbolic expression for trigonometric
Perhaps, this is the way to go with sym expressions: isAlways(A == B) isAlways(cond) checks if the condition cond is valid ...

2年弱 前 | 0

| 採用済み

さらに読み込む