Answered
Illegal use of reserved keyword "end", Error. Can some help me with it?
MATLAB is case-sensitive. This: Function [trans] = Trans_tensor2crystalori(o) needs to be: function [trans] = Trans_tensor2...

3 years ago | 0

Answered
Error invalid expression input variable
If you’re only running it using the online Run feature here, note that the online Run feature doesn’t support any interactive fu...

3 years ago | 1

| accepted

Answered
how to get in the function values above zero only and the plot stop at zero and above
Use a logical index mask — global A R=8.314; F=96485; Alfa=0.1668; n=2; c1=174512; c2=5485; T=343; T1=353; T2=363; k...

3 years ago | 0

| accepted

Answered
How to plot bode plot in 3D?
Try something like this — Fs = 44100; Ts = 1/Fs; f = logspace(-3, +5, fix(Fs/10)); w = 2*pi*f(:); R = 1e3; % resistor va...

3 years ago | 0

Answered
Error (line 43) Conversion to double from cell is not possible.
I limited this to three iterations because of time constraints (I’m running it offline and have been for a few minutes, so this ...

3 years ago | 1

Answered
How to fit a defined function?
The ‘fun’ function must be presented to lsqcurvefit as a function handle using the ‘@’ operator — x = [1 2 3 4 5]'; % x data ...

3 years ago | 1

| accepted

Answered
Find all global minima und maxima of an Graph
The findpeaks function has a number of name-value pair arguments that you can use to restrict what it returns. (My favourite is...

3 years ago | 0

| accepted

Answered
how filter the noise frequency of an audio file with notch filter
Use the zip function to create a .zip file for the .wav file and the upload that. Beyond that, your numerator and denominator...

3 years ago | 0

| accepted

Answered
How to plot a plot a function that contains itself
One option is to use the isolate function (essentially equivalent to solve) — syms a b y Eqn = y == a * log(b*y) Eqn = isol...

3 years ago | 1

| accepted

Answered
The problem of constants in linear least squares
since it is a constant, becomes a vector of ones — x = [1.02; 0.95; 0.77; 0.67; 0.56; 0.30; 0.16; 0.01]; y = [0.39; 0.32; 0....

3 years ago | 0

| accepted

Answered
how to claculate fft with window function?
The first is correct. Note that ‘s’ needs to be a column vector. Fs = 1000; L = 1E+4; t = linspace(0, L-1, L).'/Fs; ...

3 years ago | 0

| accepted

Answered
How to replicate bode plot
The problem is that you wer not sending the same vectors to your tf call that you were using in the symbolic solution. Note tha...

3 years ago | 0

| accepted

Answered
Reading tables from the asc files in Matlab
If they are text files, one option using readtable is in the Text Files documentation section, specifically using the name-val...

3 years ago | 0

| accepted

Answered
How to find index and copy data to the another table having same label?
I would experiment by vertically concatenatating the two tables and then use sortrows on the result to sort them by the first co...

3 years ago | 0

| accepted

Answered
How to plot cell datatype in MATLAB
I would simply stay with readtable and go from there. Here are two options for plotting the data — data = readtable('https:...

3 years ago | 0

| accepted

Answered
floating-point arithmetic
‘I think this happens because the IEEE754 conversion of 0.1234 and 0.123 have infinite digits.’ Correct. ‘Does anyone ha...

3 years ago | 1

Answered
Error using * Inner matrix dimensions must agree.
Change the ‘t’ assignment to: t = linspace(-0.5, 1.5, numel(n)); and it works — % clc % clear all % close all F = 13; T...

3 years ago | 0

Answered
Designing a digital filter
With the Signal Processing Toolbox, use the bandpass function. For best results, use the 'ImpulseResponse','iir' name-value pai...

3 years ago | 0

Answered
How to write x-ticks in latex.
Try this — plot([.2 .2], [0 .35],'--k') hold on plot([.5 .5], [0 .35],'--k') axis([0 1 0 .35]); xticks([.2 .5]) Ax...

3 years ago | 0

| accepted

Answered
Moving text of xline up and down and left and right
I am not certain what you want. Try this — x = 0:0.1:5; y = 0.55-0.5*exp(-1.5*x); maxSignal = 0.2; tMax = 1; figure...

3 years ago | 0

| accepted

Answered
GA fitness function with variables in a summation
I still do not completely understand what you want to do. Perhaps this — Z = randn(16,1) + 1j*randn(16,1); ...

3 years ago | 0

| accepted

Answered
how to make a random t-distribution sample?
Use the trnd function.

3 years ago | 0

Answered
Cannot get the plot to work
Subscript ‘maxROC’ — maxROC(i)=Palt/W-(sqrt(2*W))/(sqrt(altrho*S)*CL32OVCDmax); The plot then appears. The problem is that...

3 years ago | 0

| accepted

Answered
How do I extract the Datetime array from the CSV ?
The readtable funciton imports it as a datetime array — T1 = readtable('https://www.mathworks.com/matlabcentral/answers/upload...

3 years ago | 1

| accepted

Answered
Unable to plot 3D graph
The ismatrix function wil return true for a vector and for a 2D matrix. It returns false for arrays with more than 2 dimensions...

3 years ago | 0

Answered
How to plot 2d sector at a height using surf command?
Try something like this — a = linspace(0, 50); % Angle Vector r = 40; ...

3 years ago | 0

| accepted

Answered
Emg Signal analysis, Mean value filter Threshold analysis
@Lisa — I looked at the data, and I have no idea what you want to do with it. I also have no idea what the second column of ‘da...

3 years ago | 0

| accepted

Answered
I can't use installed toolbox functions
See if running these from a script or the Command Window corrects that — restoredefaultpath rehash toolboxcache If you are ...

3 years ago | 6

| accepted

Answered
How to find the valley of a PPG signal? It is getting confused with the dicrotic notch
It would help to have the data, existing code, (and a more thorough description of the desired result). In some instances, it...

3 years ago | 1

| accepted

Answered
Is there a way to get shaded error regions on a scatter plot?
It would help to have the data. Try something like this — x = linspace(0, 2*pi, 50); y = sin(x) + 0.5; err = rand(size(x)...

3 years ago | 1

| accepted

Load more