Answered
I have multiple equations that depend on a specific value and would like matlab to ask the user which equation to use and what the specific value is and then print that value but it's giving me trouble.
The 's' indicates that input for ‘lambda’ should return a character vector, so it does. If the materials are numbered, so the...

6 days ago | 0

Answered
4D matrix manipulation
I am not certain what you want. Try this: G = rand(365,31,24,91); % Create ‘G’ Gnew = reshape(...

6 days ago | 0

Answered
convert cell to integer
If ‘kar’ is initially: kar = {{[3]}}; try this: n = cell2mat(kar{:}) producing: n = 3

7 days ago | 0

Answered
Uncertainty for regressed parameters using nlinfit considering the uncertainty of data
If you want to calculate the confidence intervals on the parameters, use the nlparci function. If you want to calculate the con...

7 days ago | 0

Answered
Regression on multi-variable data
This is a linear problem, so a linear solution will work. Try this: M = [1.48 1 0.9 0.69 0]; x = [8.526 5.6 6.9654 7 0]; ...

7 days ago | 0

Answered
How can I include a superscript in my x-label
The easiest approach is likely to use semilogx (or if appropriate, loglog) to plot your data. EDIT — I am not sure what tic...

7 days ago | 0

Answered
Error showing "Undefined function 'vecline' for input arguments of type 'sym'."
You misspelled it in your call to it. You defined it as: function vectline(f,crdaxis,crdrange,step) however you called it ...

7 days ago | 1

Answered
How do I convert a .wav file to a .matlab file using wavread?
The wavread function was deprecated a while ago. Use the audioread function (R2012b and later versions) instead.

7 days ago | 0

Answered
How do I convert a .wav file to a .matlab file using wavread?
The wavread function was deprecated a while ago. Use the audioread function (R2012b and later versions) instead.

7 days ago | 0

Answered
How to plot below function f
This is how I would do it: f = @(x) (x/4).*((x > 0) & (x < 1)) + (x/3).*(x >= 1); t = linspace(-5, 5); figure plot(t, f(t...

7 days ago | 0

| accepted

Answered
Contourf plot of datasets
You might find the griddata function useful. It takes random (x,y) values and interpolates gridded z-matrices from them that co...

7 days ago | 1

| accepted

Answered
Phase spectrum without knowing frequency
The lower trace appears to be the negative derivative of the upper trace. So integrating the negative of the lower trace and ...

7 days ago | 0

| accepted

Answered
How to detect a column which gives me maximum value of the result.
Try this: x = rand(15); % Create Matrix y = rand(15,1); % C...

7 days ago | 1

Answered
Error using xlsread (line 257) Excel Worksheet could not be activated
The problem does not appear to be the Excel file, if you can read it correctly in R2017a. See if using the readmatrix function ...

7 days ago | 0

Answered
How do I convert a string to a date?
I am not certain if the numbers are themselves strings, or numbers. If they are numbers, this works: numdate = [20030930230...

8 days ago | 0

| accepted

Answered
How to create a filter with Hz and coefficient?
A filter with 8000 coefficients is likely an FIR filter. For a simple bandpass or bandstop application, an IIR elliptical filte...

8 days ago | 0

Answered
Error: Index in position 2 exceeds array bounds
I recognised my code, so I went back and looked this up. (Reference: Error: Index in position 1 exceeds array bounds.) Your ...

8 days ago | 1

| accepted

Answered
finding peak to draw a smooth curve
Try this: x = 0:10; % Create Data y = rand(1,11); ...

8 days ago | 2

| accepted

Answered
Build a matrix using an equation with known boundary values
I’m not certain what you want to do, however the MATLAB linspace function is probably the way to get there. Example — v = l...

9 days ago | 0

| accepted

Answered
How to Subtract and Add across columns in Matlab?
In the documentation for diff, see Differences Between Matrix Columns. You need to specify the dimension. EDIT — With resp...

9 days ago | 0

| accepted

Answered
Cummulation in the rows
Try this: X = randi(9, 234, 1E+4); % Create Matrix for k = 1:size(X,1) sd(k,:) = std(...

9 days ago | 0

| accepted

Answered
How can I solve the non linear algebraic equation system with a parameter
You can use the matlabFunction function to create an anonymous function from ‘F’ so you can use it with fsolve. However, you st...

9 days ago | 0

| accepted

Answered
Plotting a frequency spectrum for an Impulse Response
Since the impulse has a uniform spectrum equal to unity, the impulse response of a system (control system, filter, etc.) is gene...

10 days ago | 0

Answered
How can I get a voltage vs time plot from a wav file?
You would necessarily have to assume the units are voltage. With that assumption, they are the same. However, audio files (at ...

10 days ago | 0

Answered
datetime Invalid Parameter for TimeZone
You need to put the format string just after the 'InputFormat' name (they are ‘name-value pair’ arguments), and also use the 'Z'...

10 days ago | 2

| accepted

Answered
Repeat numbers of X based on Y to produce Z
Use the repelem function (R2015a and later): Z = repelem(X, Y) producing: Z = 1 1 1 2 3 ...

10 days ago | 0

| accepted

Answered
MIRtoolbox installation. Cannot use functions
‘I've recently downloaded MirToolbox and installed it by moving the main MIRtoolbox folder into the toolbox MATLAB folder.’ You...

10 days ago | 1

| accepted

Answered
calculate normalised frequency of the below plot
‘convert normalised frequency(0.03) into frequncy(hz)?’ Multiply the normalised frequency by the Nyquist frequency. The...

10 days ago | 0

| accepted

Answered
Demo of bode plot
Re-name your ‘norm’ function to something that does not conflict with the name of any MATLAB function.

10 days ago | 0

| accepted

Answered
Subtracting in matrix, column to column (Basic MatLab)?
Your idea is essentially correct. I have no idea what the question wants. Perhaps providing a matrix and a reference to it w...

11 days ago | 0

| accepted

Load more