Respondida
Array indices must be positive integers or logical values.
Usually this happens when you try to use 0 as an index. Indices in MATLAB start at 1 not 0. x = 1:10; This will work: y(1:2:2...

alrededor de 3 años hace | 0

Respondida
Period Length of the random numbers generated by rand() and randn()
See the "Choosing a Random Number Generator" section on this documentation page for a brief description of each of the available...

alrededor de 3 años hace | 1

| aceptada

Respondida
Find A matrix from Ax = 0
Assuming 0 is an appropriately sized vector each element of which is 0, sure. One possibility for A is the appropriately sized a...

alrededor de 3 años hace | 0

Respondida
Implementation of 4-step Runge-Kutta
You define f as: f = @(y,t) -t*y + 4*t/y; You call f as: k1 = f(t(i), y(i)); Note the order of inputs in your definition and...

alrededor de 3 años hace | 0

Respondida
I am trying to use Events option in ode45 for my program , please help!
Don't specify the first input to ode45 as the name of the ODE function 'ssp_ball_Con'. That's an old syntax, supported for backw...

alrededor de 3 años hace | 0

| aceptada

Respondida
start MATLAB on linux
From the documentation: "To start MATLAB® on Linux platforms, type matlab at the operating system prompt. If you did not set up ...

alrededor de 3 años hace | 1

Respondida
Break title into multiple lines?
If you're not sure where to break the line of text, you can use the textwrap function. s is a long-ish title, 97 characters lon...

alrededor de 3 años hace | 1

Respondida
Array indices must be positive integers
The variable func is a vector, the value of the function handle f evaluated at the points in x. On the line where you compute mi...

alrededor de 3 años hace | 0

| aceptada

Respondida
Related to vectors ?
As a guess, do you want to know if you can reach all the targets from one of the sources? You could use a graph object (assuming...

alrededor de 3 años hace | 0

Respondida
Use of Dates in nested structure
I would to create a structure for the string xxxx.yyyy (This is the name of entity, it has a dot). By this do you mean you want...

alrededor de 3 años hace | 0

Respondida
why cannot generate the sequence of Years
Let's look at your vectors in a different format, with day and month information not just year information. s=datetime('2014',...

alrededor de 3 años hace | 0

| aceptada

Respondida
Matlab trial list behavioral experiment
What's the format of the entries in your trial list, and what does "execute the stimuli" mean in this context? Does it mean to p...

alrededor de 3 años hace | 0

Respondida
How to run please this example perfectly to get optimal solution .. Thank you
lb = zeros (5, 1) ; ub = zeros (5, 1) ; So based on the way you've constructed the bounds, all the elements of your solution h...

alrededor de 3 años hace | 0

| aceptada

Respondida
Calculating the sum of a quantity
Are you trying to bin the data and then compute the mean in each bin? If so consider using findgroups or discretize to determine...

alrededor de 3 años hace | 0

Respondida
Update Curve Fitter data
If you're using the Curve Fitter app you could fit your first set of data interactively then generate code from the fit and use ...

alrededor de 3 años hace | 1

Respondida
Error creating standalone matlab app designer application (symbolic variables , solve)
Looking at the Support for MATLAB, Simulink, and Toolboxes page for MATLAB Compiler, the entry for Symbolic Math Toolbox for MAT...

alrededor de 3 años hace | 0

| aceptada

Respondida
How to perform Eigenvalue Decomposition e.g, eig() on multiple GPUs?
Do you need all the eigenvalues and eigenvectors or do you just need a few of them? If the latter, consider using the eigs funct...

alrededor de 3 años hace | 0

Respondida
We are trying to solve Q1 using ode45 and these are my functions and my error that i am giving, is there any help that yall can do?
There are a number of issues with this code. Stepping through: clc;clear;close all; You don't need to include these in your sc...

alrededor de 3 años hace | 0

Respondida
bug in multiplication operations
Not all integer values that are in range of double precision are exactly representable as doubles. If we look at your constant: ...

alrededor de 3 años hace | 4

| aceptada

Respondida
Unfamiliar error message from ode45: "Unrecognized function or variable 'packageAsFuncHandle".
More likely than not they have an ode45.m file that's not in the correct location that MATLAB expects it to be. What does this f...

alrededor de 3 años hace | 0

| aceptada

Respondida
How to rearrange 2x5 matrix while keeping the size the same?
x = [1, 5, 9, 4, 8; 3, 7, 2, 6, 10] y = reshape(x(:), flip(size(x))).' For comparison: expected =[1, 3, 5, 7, 9 ; 2, 4, 6, 8,...

alrededor de 3 años hace | 1

Respondida
How to deseasonalize this temperature record?
Try the trenddecomp function or the Find and Remove Trends Live Editor Task.

alrededor de 3 años hace | 0

Respondida
A matrix times a vector whose elements are matrix too.
a vector initialvector whose elements are also matrix That doesn't exist in MATLAB, at least not if you want initialvector to b...

alrededor de 3 años hace | 0

Respondida
How to do "class " like Python to control equipment
You can create class files in MATLAB. But rather than writing your own VISA interface, if you have a license for Instrument Cont...

alrededor de 3 años hace | 0

Respondida
Why do I get "Array indices must be positive integers or logical values"
You use Tm in your code but nowhere do you define it. My suspicion is that you've defined it as a numeric vector like you did Tf...

alrededor de 3 años hace | 0

| aceptada

Respondida
Non linear fit of y=f[x] where y can have multiple values for a single value of x
Are you trying to fit x and y as functions of a third variable t, which in this case could be the indices of the elements in the...

alrededor de 3 años hace | 1

Respondida
how to create a cell array with functions from a matrix consisting symbolic expression
Use arrayfun to call matlabFunction on each element of your symbolic array. In order for all the functions to have the same sign...

alrededor de 3 años hace | 1

| aceptada

Respondida
Read older MATFILE in the current version.
I tried loading the original data using the oldest release of MATLAB I can run and was able to read it. It must have been create...

alrededor de 3 años hace | 0

Respondida
I have a problem in the value of a2 becuase I need to change the value of p and se in the same time to have the right array
Can you create and use variables with numbered names like phi1, phi2, phi3, etc.? Yes. Should you do this? The general consensu...

alrededor de 3 años hace | 0

Respondida
For loop over permutations of 1:n with very large n
How long does your loop body take to execute? If it's one loop body execution per second, running all 1e18 of those iterations w...

alrededor de 3 años hace | 1

| aceptada

Cargar más