Answered
Can I believe the values of these large integers?
clear; clc; tic; mAx = 10000; daTa = zeros(mAx,mAx); daTa(:,2) = 2; daTa(:,1) = 1; daTa(1,:) = 1; daTa(3,3) = 3; for idx ...

3 years ago | 0

| accepted

Answered
asking about command in matlab
As much as I completely agree with @the cyclist, that you need to start to learn MATLAB, you also need to learn to take apart a ...

3 years ago | 0

Answered
elliptic curves and finite fields in Matlab
An inverse is trivial in MATLAB. Just use gcd. That is, if you want to solve the problem a*x = 1, mod P where a and P are ...

3 years ago | 0

Answered
variance for an array
Why would you need a for loop? V = 42; % you don't tell us what is the variance. So that is my choice. 42 is the answer to all ...

3 years ago | 0

Answered
Construct the complete curve from one segment of it
load d1.mat x = d1(:,1); y = d1(:,2); k = 130:270; plot(x,y,'-b',x(k),y(k),'ro') Seriouisly, you want to reconstruct the EN...

3 years ago | 0

Answered
Problem with convergence of nonlinear equation systems with constraints ( using solve() )
A common fallacy that people fall to, is that just because you don't know the value of some variable, that it MUST be symbolic. ...

3 years ago | 0

Answered
why I get error when Start my code with %?
%% Section 1 % ka=0.8; Am=1; fm=2; t=0:0.001:1; mt=Am*sin(2*pi*fm*t); Ac=2; fc=50; ct=Ac*cos(2*pi*fc*t); St=(1+ka.*m...

3 years ago | 0

Answered
how to solve this
You already solved it. So where is the problem? If I had to guess, it is why the circle you just plotted does not appear circula...

3 years ago | 0

Answered
Fast Evaluation of Multivariate Polynomials
You have clearly not looked quite EVERYWHERE. Had you done so, you might have found my polyfitn. In there, is a polyvaln code, w...

3 years ago | 1

Answered
Sorting of points (2D) clockwise with respect to the center of gravity
I'm confused. Have you already subtracted off the center of gravity from the columns of data? I don't see that operation. If not...

3 years ago | 0

Answered
The Chinese Remainder Theorem
Since I was going to post this on the FEX anyway, I've attached a simple code to implement the basic C.R.T. Note that all you re...

3 years ago | 0

Question


Solving systems of linear congruences in MATLAB
I've noticed many questions over the years where someone would like to find all integer solutions to a problem. And often it is ...

3 years ago | 0 answers | 1

0

answers

Answered
How to compute the difference of the integrals of two functions (f(x) and j(x)) only over the portions where f(x)>j(x)
I don't see why it should be a struggle. Start at the beginning. Break the problem down into small pieces. Then solve each of th...

3 years ago | 1

Answered
How can i equally distribute a list of values into 3 approximately equal groups.
DON'T WRITE YOUR OWN CODE to solve problems that are already well known and solved by others who understand the problems and how...

3 years ago | 0

Answered
Temperature conversion script doest work with negative input value
Nope. Works just fine. For example, with F = -459 (approximately absolute zero) you should get approximately -273. F=input('Inp...

3 years ago | 0

| accepted

Answered
Convergence can't be reached in lsqcurvefit
Not every model you pose will always fit every set of data. But first, we should look at your model, as well as your data. G_pr...

3 years ago | 0

Answered
I need an activation key for license 4xxxx
Answers is not customer support. We cannot help you. In this respect, even if someone COULD help you, they would not post an act...

3 years ago | 0

Answered
Spline with clamped end conditions using griddedInterpolant
You cannot do so. There is no capability for that in griddedInterpolant. But I fail to see the problem. Just use spline, which D...

3 years ago | 1

Answered
Plotting multiple figures using subplot
help subplot

3 years ago | 0

Answered
isprime function seems to have poor performance
As a followup, to this question, I've now learned where the time has gone. In R2018 or so, the symbolic toolbox isprime call wa...

3 years ago | 3

Answered
what's wrong with this code?
When you tell us that something does not work, you NEED to tell us what happens. Was an error generated? SHOW THE COMPLETE ERRO...

3 years ago | 0

Answered
Which optimization method is better for problems with random steps
No optimizer is good in this case. That is, all of the classical optimizers ABSOLUTELY assume that your objective is a well def...

3 years ago | 0

| accepted

Answered
Trapezoidal integration without built-in functions
The fact is, trapezoidal integration in a higher number of dimensions in R^d, MUST take O(N^d) operations. Sorry, but it will be...

3 years ago | 0

Answered
How to Restore source code from Standalone-App - Executable file (.exe)
https://www.mathworks.com/matlabcentral/answers/362964-possibility-of-decompiling-exe-to-m-files I would strongly suggest you s...

3 years ago | 0

Answered
how do I solve a 2nd order differential equation with multiple first derivatives
As you have written it, this problem is unsolvable. (Had you read the docs for a tool like ODE45, the basic procedure is explic...

3 years ago | 0

Answered
Error and Warning solving equations.
Admittedly, it is a mess of stuff to paste in. :) Wo = 3584.74 * 9.8; Vm = 268.76/3.6; Rm = 680 * 10^3; rho = 1.225; l_tr...

3 years ago | 0

| accepted

Answered
How to can I solve a cubic equation with wide ranges of T and P?
MATLAB does not offer an interval arithmetic solution for roots. (Nor will it ever do so, I predict.) This would get pretty comp...

3 years ago | 0

Answered
Attempted to access Son(0.000673333); index must be a positive integer or logical.
How should MATLAB understand this part of your code? Son (6.73333*10^-4) Should MATLAB know that you want to multiply a va...

3 years ago | 0

Answered
Presenting faces at random without repetition
Pick the 10 images to be shown immediately, as 10 numbers from the set 1:23, WITHOUT replaceemt. randperm will do that for you. ...

3 years ago | 0

| accepted

Answered
excluding a number before sending x vector to optimization?
You don't tell us WHICH heuristic algorithm you are using, so that means it is a homebrew algorithm of your own choosing or crea...

3 years ago | 1

Load more