Answered
How to exhaust all the binary array of length N?
N = 5; desired_matrix = dec2bin(0:2^N-1) - '0'

3 years ago | 0

| accepted

Answered
Examples of GPU do not work
See https://www.mathworks.com/help/parallel-computing/parallel.gpu.randstream.parallel.gpu.randstream.create.html and https://ww...

3 years ago | 0

Answered
Identify the coefficients of each constraint separately
You want to operate over rows of Y and over colums of Y. What you do is reshape() Y to be a row vector, and start creating row...

3 years ago | 0

Answered
Unable to perform assignment because the size of the left side is 2-by-1 and the size of the right side is 2-by-2.
Rhsprob=@ (t,U)[U(2),-32.17/2*sin(U(1))] That returns a row vector. wvals(:,1)=init_y; That is a column vector. k1=h*rhsf(tv...

3 years ago | 0

Answered
How to plot upper and lower bounds in graph with 95% confidence.
For this type of task, plotting 95% confidence, a common technique is to take the standard deviation std and use norminv to find...

3 years ago | 0

Answered
Apply different colormaps to different data sets on histogram2
MATLAB permits one colormap per axes . If you need more than one colormap then you have a couple of choices: create multiple ...

3 years ago | 0

Answered
Evaluating symbolic function with a vector
MATLAB does not permit defining symbolic functions that accept vectors of values and distributes the values into multiple parame...

3 years ago | 0

| accepted

Answered
How to solve the problem?Thank you
You have a model named SWC_TrqDMDwithTable that you are trying to generate code for using Simulink coder. When you want to gene...

3 years ago | 0

Answered
How to change HH:mm:ss:SSS to HH:mm:ss.SSS for a column?
time = {'01:18:34:754'; '13:04:19:999'} converted = duration(string(datetime(time, 'InputFormat', 'HH:mm:ss:SSS', 'Format', 'HH...

3 years ago | 0

| accepted

Answered
How to process this text file containing multiple coordinates in Matlab
It looks to me as if you would use jsondecode and get back a struct()

3 years ago | 0

Answered
how to turn this script into for loop
subject = '~/lab/MATLAB/subject'; imgfiles = dir(fullfile(subject, 'SL*', 'T.nii*')); matlabbatch{1}.spm.tools.data_T1 = fullf...

3 years ago | 0

Answered
have a code error .can you help me thıs code.Error in untitled (line 91) Cd = interp1(A1,cd1,A,'linear');
A1=0:5:180; cd1=1:1:36; 5,10 would be one pair. 15,20 would be a second pair, 25,30 would be a third pair, and so on t...

3 years ago | 1

Answered
Want to use nested For loop
n0 = 1; n1 = 2; n2 = 1; n3 = 2; d1 = 0.1; d2 = 0.2; lam = 3:0.01:7; th = 0; phi1 =(d1./lam).*sqrt((n1)); phi2 = (d2./la...

3 years ago | 0

Answered
Data Acquisition of VFD from cDAQ in MATLAB
You need an RS485 based MODBUS interface to talk to that device. You might be able to find a cDAQ device that can handle that, b...

3 years ago | 0

| accepted

Answered
How to change the marking in colorbar?
lambda=532 w0 = 1; % beam waist z = 0; % propagation distance k = 2*pi/lambda; % wave number l = 1; ...

3 years ago | 0

| accepted

Answered
Splitting Excel column input into 5 at FIXED WIDTH columns
extractBetween filename = 'AppropriateFileName.xlsx'; AppropriateColumnNumber = 7; %change to actual column number opts =...

3 years ago | 0

| accepted

Answered
Unable to perform assignment because the left and right sides have a different number of elements.
u = -B2^(-1)*(c*A*z+k*s+ Q*sign(s)- dsidot*A12'*P*z(1)) dsidot is scalar, A12 is 2 x 1, so dsidot*A12' is 1 x 2. P is 2 x 2 so ...

3 years ago | 0

Answered
How to output a timeseries from matlab function in simulink?
Using the code outline function y = fcn(first_input, second_input) y = zeros(some size); %pre-allocate y = some_functi...

3 years ago | 0

Answered
How does Matlab editor exactly open compressed (-V7) files
As @Jan indicated, the MATLAB editor does not load .mat or .fig files. load and openfig always load the entire variable into me...

3 years ago | 0

| accepted

Answered
error message 'char'.how to solve?
The function importdata has an option to generate a function that will import other files using the same configuration. It is co...

3 years ago | 0

Answered
Can you please say why it is coming this error? i need a solution
opts=detectImportOptions('Capteur2125011.txt'); There you are asking to analyze a specific file, expecting the file to be in th...

3 years ago | 0

Answered
backslash(\) is through error in 2013a but not to 2018b
You did not use the \ operator: you used the .\ operator. A.\B is the same as B./A -- element-wise division but with the order ...

3 years ago | 0

| accepted

Answered
How can fix that error in this simulation?
Derivatives not being finite at time zero are typically mistakes in initialization -- in particular, forgetting that input signa...

3 years ago | 0

Answered
using for loop with syms
syms n0 n1 n2 ns phi1 phi2 n0 = 1; n1 = 2; n2 = 1; n3 = 2; d1 = 0.1; d2 = 0.2; lam = 3:1:7; th = 0; phi1 =(d1./lam).*sq...

3 years ago | 1

Answered
how to install Deep Learning Toolbox in MATLAB Runtime
No. Toolboxes cannot be installed in MATLAB Runtime. In particular the only parts of Deep Learning Toolbox that can be deployed...

3 years ago | 0

Answered
Unable to write to MAT-file on the folder synced by OneDrive
Microsoft made changes to OneDrive that MATLAB had to adjust to. I seem to recall that the problem was fixed in one of the R20...

3 years ago | 0

Answered
Error using interp1>reshapeAndSortXandV X and V must be of the same length
For the purposes of interp1, x is the independent variable, and v is the corresponding dependant value. For example you might h...

3 years ago | 0

Answered
Error using fmincon, Supplied objective function must return a scalar value.
Xr=0:0.1:250; That is a row vector Yp = 3.5/2*(1+tanh((3/30*(Xr+15-70))-1.2))-3.5/2*(1+tanh((3/30*(Xr+15-125))-1.5)); This is...

3 years ago | 0

| accepted

Answered
Running multiple functions at once in MATLAB App Designer
You can get them to run at the same time if you use parfeval() However !! The background process cannot directly display to th...

3 years ago | 1

Answered
Does wavedec2 and waverec2 support complex valued array inputs?
The documentation for wavedec2() does not say that the input, X, must be real-valued. However, the output vector is defined as...

3 years ago | 0

Load more