Answered
Issuing a call to a function
This should help you, solving the problems: https://de.mathworks.com/help/matlab/matlab_prog/create-functions-in-files.html

6 years ago | 0

Answered
I face an error when apply bvp4c: Unable to solve the collocation equations -- a singular Jacobian encountered.
It appears to work by making 2 small changes in the code: init=bvpinit(linspace(0.001,0.9999,10),[0 0]); sol=bvp5c(@bvp_Q,@bvp...

6 years ago | 1

Answered
How to filter a data
You can do this if there is a pattern: X = [0.081,0.082,0.089,0.091,0.095,0.098,0.13,0.15,0.18,0.21,0.25,0.31]; x = [X(1:3:end...

6 years ago | 0

Answered
How can I sort a matrix elementwise ?
B = sort(reshape(A,[],1))

6 years ago | 1

Answered
Error: Error using load Unknown text on line number 1 of ASCII file cats.csv "Sex".
try <https://de.mathworks.com/help/matlab/ref/readtable.html |*readtable*|> instead.

6 years ago | 4

| accepted

Answered
Locate any decimal value inside a matrix?
Why use an ineffficient loop instead of vectorized inbuilt functions? Try: x=[1 2.5 4;5 3 3.2;4 9 2] idx = find(mod(x,1)~=...

6 years ago | 0

Answered
Convert matrix A to S
S=[A(2,1:2); A(1,1:2); 9 10]

6 years ago | 0

Answered
Extract column from matrix
Do this A2 = A(:,3) but note that you did not code the matrix as you wrote: >> A = [6 2 3; 9 3 5; 4 4 7] A = 6 ...

6 years ago | 0

Answered
what is the problem in this function ?
Use: result = fmin4(a,b,c) instead of pressing the RUN button

6 years ago | 0

| accepted

Answered
problem in dealing Cell and array
% produce some data to play with r = 3; q = 4; k(1:5) = {rand(r,q)}; % size of k = 1 x 5 % This should do what you expect:...

6 years ago | 1

| accepted

Answered
I need help with this false position script
No idea what your problem is, code runs for me: format long fx=@(x)-12-(21*x)+(18*x^2)-(2.75*x^3) a =sprintf('%.8f', fp(f...

6 years ago | 0

Answered
Run a script multiple times and save outputs
Write a function or a second script which calls your script in a for loop and save the results in a new line of a result matrix ...

6 years ago | 0

| accepted

Answered
How can i reduce the powers of all plotted functions to 0
one approach using string arrays: number = exp(100) a = split(string(sprintf('%e',number)),"e+"); b = double("1e+" + stri...

6 years ago | 0

Answered
energy harvesting with game theory
The was you ask it: No. In general there are no tailored codes for very specific things like you want. You can browse <htt...

6 years ago | 0

Answered
Creating a sinusoidal graph
Note the frequency of your signals. Are 100 values really enough to display this frequency correctly? Hint: Think about somethi...

6 years ago | 0

Answered
Create a table in MatLab with specific data in different spreadsheets in one Excel File.
Use the <https://de.mathworks.com/help/matlab/ref/readtable.html?s_tid=doc_ta#d117e1215216 *|sheet|*> option from the *|readtabl...

6 years ago | 1

| accepted

Answered
R2018a contained wlan example code, but none of it is in R2019b. What happened to all the wlan example code?
There is a bunch of examples here: <https://de.mathworks.com/help/wlan/examples.html>

6 years ago | 0

Answered
How to convert a matrix to a vector
M1=reshape(M.',[],1)

6 years ago | 0

| accepted

Answered
I don't know why ODE45 function does not count time. Runs forever.
Your code repeats calculations on constants that should be done only once for performance - but more important ist that your ode...

6 years ago | 3

Answered
How to find the arc length of a trajectory?
Maybe it helps if you know the center coordinates and the radius of your circle -after that you can calculate the angles and use...

6 years ago | 0

Answered
Conversion of 2000x3 decimal matrix .txt file into binary 2000x3 .txt file
This should work: A = readmatrix('test_input_xyz.txt'); [sz1, sz2] = size(A); A = reshape(A,[],1); B = sdec2bin(A,12); B = ...

6 years ago | 1

| accepted

Answered
Error in simulation using ODE15s (probably with vertcat)
function template %set the parameters p = set_parameters; %set the initial conditions input.Conc= [100 0 0];%target viru...

6 years ago | 0

Answered
how to change size of a string?
a = 'K10' b = string(a) whos

6 years ago | 0

| accepted

Answered
Linear regression - extracting info using matrix algebra
add a column of ones to your matrix DATA in pos. 4. isolate income as a column vector and remove this column from DATA then use:...

6 years ago | 0

| accepted

Answered
how can write PSO constraints
Use the lower and upper bounds input argument, like shown in the documentation: <https://de.mathworks.com/help/gads/particles...

6 years ago | 0

| accepted

Answered
Error in ODE 45: MYODE must return a column vector.
To solve this error make sure that dy is column vector. dy = [du; dv] could already solve the problem - but only if th...

6 years ago | 0

| accepted

Answered
Solving a system of equations without "syms"
doc linsolve or https://de.mathworks.com/help/matlab/ref/linsolve.html

6 years ago | 0

Answered
How to covert unit of Voltage(V) to acceleration(m/s^2) and in speed (m/s)
https://wikimedia.org/api/rest_v1/media/math/render/svg/438ac92993d4032c8660665fcb017cbe76c4a113 The last term on the right sid...

6 years ago | 0

| accepted

Answered
How to make the vessels brighter in this segmented image
I = imread('untitled.jpg'); I1 = imadjust(I,[0 0.1]); imshow(I1) results in:

6 years ago | 0

| accepted

Load more