Answered
How to combining outputs into one array?
When you are iterating over values that are not simple consequative integers starting from 1, then it is often a good idea to cr...

3 years ago | 0

Answered
Error in hdfread (line 219)/ Error using hdfread>parseInput
For this purpose, I wrote a tool to recursively search structures and cells and objects looking for fieldnames or field contents...

3 years ago | 0

| accepted

Answered
Getting error message "Index exceeds the number of array elements. Index must not exceed 0."
readtable() by default uses detectImportOptions or one of its variations. For an xlsx file, a spreadsheetImportOptions object wo...

3 years ago | 1

Answered
Reading only certain sections of a text file into matlab
The section up to coordinates = [X, Y]; looks fine to me. You could reduce your effort by using format = repmat('%f', 1, 7); ...

3 years ago | 0

Answered
How to calculate the dot product of the complex conjugate of the Fourier transform of one signal with the Fourier transform of the other ?
Fourier Transform is fft Complex conjugate is conj Dot product is dot

3 years ago | 0

Answered
whats the problem in error 11
Your t and m have fewer elements than your s, so you cannot plot t against s or m against s. You could plot t against m

3 years ago | 0

Answered
Why am I getting an Indexing error while using sum
e=randn(n,1); e(1) = 0; e is a vector. syms k k is a symbolic variable f(k) = (alpha.^(k-1)).*(e(k)); With e being a vecto...

3 years ago | 0

Answered
read specified data range for fread a large binary file
There are two common ways that blocks of binary data can be arranged in a file. If the data is stored so that for a given loca...

3 years ago | 4

Answered
textscatter does not use LaTeX
You are correct, textscatter() creates TextScatter objects, which do not have currently have any capacity to set the interpreter...

3 years ago | 0

| accepted

Answered
how to change an Online MATLAB (basic) to Online MATLAB
Individual MATLAB Central accounts must be associated with MATLAB licenses in order to get more than the 20 hours a month. The 2...

3 years ago | 0

Answered
Encountering error with using fmincon
format long g data = xlsread('Fresh5_Data.xlsx'); strain_extensometer= data((3:268),3); time_DIC= data((3:268),2); experimen...

3 years ago | 1

| accepted

Answered
Blobs being labelled incorrectly when changing between consecutive images
The situation might be different for complicated objects, but most of the time the blobs end up labeled according to which blob ...

3 years ago | 0

| accepted

Answered
Invalid expression. Check for missing or extra characters
Doing what the error message says to do fixes that error... exposing other errors. L = 3; eta_0 = 1 % Initial value of eta to...

3 years ago | 0

Answered
Create an area mask using a shapefile
For polyshape objects use isinterior instead of inpolygon.

3 years ago | 0

| accepted

Answered
Why am I getting a parse error trying to put this function in MATLAB?
fx = @x exp(x) + x^2 - x - 4 In MATLAB, @ followed by a name is a request to create a function handle to a function with the gi...

3 years ago | 0

Answered
User input fractions or operations
Yes. When you use input() without the 's' option, then whatever the user inputs will be executed and the result will be stored i...

3 years ago | 0

| accepted

Answered
Optimization with asymmetrical prices
When you have any kind of situation like that, the objective function almost always has discontinuous first derivatives. You hav...

3 years ago | 0

| accepted

Answered
Available memory error in MATLAB quiz
Suppose you have rand(1,1e8) . Then the resulting array will have 1 * 1e8 locations in it, and each one of them will be a double...

3 years ago | 3

| accepted

Answered
How to find the peaks?
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is a program for 1-D Photonic crystal...

3 years ago | 0

| accepted

Answered
How to open .img or .hdr image
See https://www.mathworks.com/help/images/ref/niftiread.html

3 years ago | 0

| accepted

Answered
User input by sign
See https://www.mathworks.com/matlabcentral/answers/143088-real-time-detect-keypress#answer_285124 for a list of key press proce...

3 years ago | 0

Answered
How to apply "switch" function to this question.
s = 1; possible_outcomes = [ s + 1j*s, s - 1j*s, -s + 1j*s, -s - 1j*s]; N = 50; randomNumber = randi(numel(possible_outcome...

3 years ago | 0

Answered
Modify invalid field names in .mat file using code
Use @James Tursa https://www.mathworks.com/matlabcentral/fileexchange/42274-loadfixnames-loads-a-mat-file-fixing-invalid-names?s...

3 years ago | 0

Answered
I have a table in workspace and want to plot the data in it. How do I do that?
plot(NameOfYourTable, "Time", "Voltage") %or, on older versions of MATLAB plot(NameOfYourTable.Time, NameOfYourTable.Voltage...

3 years ago | 0

Answered
Get the analytical solution of inequalities in Matlab.
Most of the time, MATLAB is not able to solve systems of inequalities. See the recent discussion at https://www.mathworks.com/m...

3 years ago | 1

Answered
How to display certain iterations
if (n >= some_lower_bound && n <= some_upper_bound) || (n >= some_other_lower_bound && n <= some_other_upper_bound) disp(so...

3 years ago | 0

Answered
How to reduce run time of for loop
num_of_layup_req = []; flag = false; % Initialize flag variable while numel(num_of_layup_req) == 0 for m = 1:K for n = 1...

3 years ago | 0

Answered
symbolic function give error list of equations must not be empty
syms Shy syms phi_den por_den = 0.4:0.1:0.8; W= 1.2; rho_ma = 2.75; rho_water = 1.03; rho_hydrate = 0.90; measure_VEL=1.4:0.1...

3 years ago | 0

Answered
Memory preallocation for array of objects with irregular array length property
Provided that MyClass_Object does not already exist: lengths = [100;200]; NumL = length(lengths); MyClass_Object(NumL, :) =...

3 years ago | 0

Answered
plotting four variable using meshgrid for 3 variables, but i am getting error
meshgrid with 3 inputs always returns 3 dimensional outputs (unless the third input just happens to be scalar.) So your XX, YY, ...

3 years ago | 0

| accepted

Load more