Answered
trying to create a plot of cost per mile when the trailer weight increases in a program I wrote and i cannot get it to work.
You were doing well, but starting from 'diesel' when C==6 then you have elseif TW>2000 && TW<=4000 and...

3 years ago | 0

Answered
Simplifying equations with trigonometric terms written in terms of degrees and not radians
C2D = @(C) cosd(rad2deg(children(C, 1))) mapSymType(Expression, 'cos', C2D)

3 years ago | 1

Answered
Error using ' TRANSPOSE does not support N-D arrays. Use PAGETRANSPOSE/PAGECTRANSPOSE to transpose pages or PERMUTE to reorder dimensions of N-D arrays.
Your nc file has lat, long, one depth, and multiple times, making it a 4 dimensional array. You are trying to pcolor() the entir...

3 years ago | 1

| accepted

Answered
Unable to use ODE45 to model data, error with "Unable to meet integration tolerances without reducing the step size below the smallest value allowed (4.708773e-14) at time t."
c0=[0.0188,0]; A=beta(3)*c(1)^beta(1); B=beta(4)*c(2)^beta(2); I would think it is highly likely that that ode23t i...

3 years ago | 0

Answered
Help for matrix in matlab
prod(M, 2) sum(M, 2) min(M, 2) max(M, 2) any(M, 2) all(M, 2) std(M, [], 2) amongst others

3 years ago | 0

Answered
How to solve "Inf" from table calculation in GUI
your xtes and ytes are exactly the same so subtraction gives 0.

3 years ago | 2

Answered
uifigure alternatives for gcf, gcbf, gco, gcbo, gca, and any other legacy figure based functions
I used to think that those functions simplify didn't apply to uifigure and children. However someone indicated that the real iss...

3 years ago | 0

| accepted

Answered
can you specify a newly created sheet to be at the start of a spreadsheet using writetable?
no, writetable cannot manipulate the tab order. If you happen to be using Windows see https://www.mathworks.com/matlabcentral...

3 years ago | 1

| accepted

Answered
helps to solve objective function with restriction, to obtain the value of the constant C
The integral of the density function must be exactly 1. The c is a constant multiplier. So if you calculate the integral without...

3 years ago | 1

Answered
All functions in a script must be closed with an 'end'.
Delete or comment out everything from the "function" line. * Your script never invokes the function * functions inside a scr...

3 years ago | 2

Answered
min and max Functions Breaking After Conversion From Symbolic to MATLAB Function
Symbolic variables (that are not symmatrix) are scalars. For scalar x, min(5,x) is the same as min([5,x]) Symbolic operations...

3 years ago | 1

| accepted

Answered
Getting error in Inverse Kinematic block using robotics system toolbox for 2 DOF planner robot
rename your MATLAB\inverseKinematics.m to a different name. The current name is interfering with a built-in model with the same ...

3 years ago | 2

| accepted

Answered
How to make colorbars symmetric?
In order to have the color scale be consistent between the two, the axes CLim property must be the same for the two plots. In pa...

3 years ago | 0

Answered
what's wrong my code about ode model
When you press the green Run button to run the code, should MATLAB: (A) look in the calling function to see whether it happends...

3 years ago | 0

| accepted

Answered
how can improve my code performanece, it uses a syms vector, i tried to delete y=t= sym(zeros(1, m + 3)); and it's faster but the solution of the function its wrong
t(k)=(-(4*S*R*k*(k+1)+4*S*R*(k+1))*t(k+2)+(1+FS-b*S*ra-6*S*R^2*(k-1)*k-12*S*R^2*k)*t(k+1)+(-4*S*R^3*(k-2)*(k-1)+2*...

3 years ago | 0

Answered
Storing parameters from a for loop in arrays
You have theta1(i, :) = theta(1); theta2(i, :) = theta(1); Notice you are storing theta(1) in both cases. You should ...

3 years ago | 0

Answered
assign name row to table
Either use LastName = ["Sanchez";"Johnson"]; Sistemi_check.Properties.RowNames=LastName; or else LastName = {'Sanchez';'John...

3 years ago | 2

Answered
Latex Failing for Big Linear System
cla probes = 1:10; base = repmat('\pi', 1, 300); %900 characters for K = 1:length(probes) msg = "$" + base + repmat('x...

3 years ago | 0

| accepted

Answered
How can I solve my for
syms x Caudal=[5.93266E-05, 0.00082573, 0.001571951, 0.002318172, 0.003064541, 0.004018053, 0.00493061, 0.005552929, 0.00654917...

3 years ago | 0

| accepted

Answered
MATLAB giving me a 16x1 complex double answer?
You are using floating point inputs, each of which is inexact. For example is 89.81 intended to represent exactly 8981/100 or is...

3 years ago | 0

Answered
Matrix double and complex double
That algorithm would be for element-by-element multiplication. For * (matrix multiplication) you need to mentally transpose the ...

3 years ago | 0

Answered
Offload figure graphic computations from NVIDIA to local intel GPU
https://superuser.com/questions/1657952/disabling-nvidia-gpu-for-routine-tasks shows how to change your graphics card preference...

3 years ago | 0

Answered
vpa solving 5 equations with 5 unknowns, but result is an empty structure
When you are dealing with symbolic inequalities, you have two choices: You can convert them directly to symbolic equalities, so...

3 years ago | 0

Answered
GLOBAL VARIABLE :HOW USE IT?
Global variables are only reachable within the current workspace. Consider the following code: first(); second(); third(); fun...

3 years ago | 2

Answered
Solving the Maximum and Minimum Problems of Multivariate Functions
No. You have coded finite lower bounds and upper bounds for x3, and you have coded a single region for x1. However your problem ...

3 years ago | 0

Answered
attaching callback function to a serialdev object.
Callbacks are not supported for serialdev() objects. Note that this serial port lives on the pi and is for connecting an extern...

3 years ago | 0

| accepted

Answered
How can I put shapes (as circles, and arrows) and (multi-rows) texts outside a Matlab plot?
The formal method is to use annotation However note that annotation() cannot use data coordinates, so it can be messy to place...

3 years ago | 1

| accepted

Answered
I would like to shorten the code, but keep the same type and size of the variable N{t}{w}(i).
N = repmat({repmat({zeros(1,10)}, 1, 3)}, 1, 3)

3 years ago | 0

Answered
New tab Sheet using fprintf function
No, that is not possible. csv files are pure text files, and do not have tab sheets. Putting data on other tabs is possible in ...

3 years ago | 0

Answered
Will Dropbox new use of Apple file API make things difficult for me?
MATLAB's uigetfile() already uses native operating system file choosers, so if you have been using uigetfile() on MacOS you alre...

3 years ago | 0

Load more