Answered
Error using fzero on line 306 with function handles
The error is correct, you cannot add function handles. f1 = @(x) sin(x); f2 = @(x) cos(x); f3 = @(x) f1 + f2; f3(pi/4) % Thr...

7 years ago | 0

Answered
Is there a way to save an Editor window view or structure?
Release R2019a introduced Projects that may do what you're looking for, or at least get close to what you want.

7 years ago | 0

| accepted

Answered
Triple Summation in Matlab
For the first term if F is a column vector and a is a 3-dimensional array that have compatible sizes just multiply them using a...

7 years ago | 0

Answered
How to create an array from array of numbers??
for i=1:length(thrust.times) if thrust.times(i)<=1 Base_Time=0.1; Extra_Time=0; elseif thrust.times(...

7 years ago | 0

Answered
TUTORIAL: Why Variables Should Not Be Named Dynamically (eval)
Alternative: Use a table or timetable Array table (introduced in release R2013b) and timetable (introduced in release R2016b) a...

7 years ago | 3

Answered
How to get arg min of an N-dimensional Matrix ?
If you're using release R2019a or later, you probably want to call min with the 'all' dimension input and the 'linear' flag.

7 years ago | 0

Answered
MATLAB function help, input arguments errror
function Probability = Geometric(p, q, x) This suggests the name of the function file containing this function is Geometric.m. ...

7 years ago | 0

Answered
How to ignore non-existing variables in a for loop?
I interpreted your question a bit differently than I think Matt J did. I suspect you want to load your data then check if the de...

7 years ago | 1

Answered
Digraph from two columns of data
>> names = ["Boston"; "New York"; "Chicago"; "Los Angeles"; "Washington DC"]; >> D = digraph(names(1:end-1), names(2:end)) Add...

7 years ago | 0

Answered
Why can't I concatenate input variable to file extentsion in another variable?
Since you do not return the variable named faif from the function, once the function call ends it is destroyed along with the re...

7 years ago | 1

| accepted

Answered
Working with table.
Do you need your data to be stored in a table or would a timetable be acceptable instead? Offhand I can't think of anything you ...

7 years ago | 0

Answered
Undefined function 'eq' for input arguments of type 'timetable'.
For this particular application, I recommend using standardizeMissing.

7 years ago | 1

| accepted

Answered
How can I group a timetable in hours 0-24h
See the "Aggregate Timetable Data and Calculate Mean Values" example on the retime documentation page. While that uses a duratio...

7 years ago | 0

Answered
I keep getting the message: Unbalanced or unexpected parenthesis or bracket. How would I fix it? I'm trying to solve for the maximum and minimum with a function and it's constraint.
T = [ ax ay subs(g,{x y},{ax ay}) subs(f,{x y}, {ax ay })({bx by}) ... subs(g,{x y},{bx by}) subs(f,{x y}{bx by})] This p...

7 years ago | 0

| accepted

Answered
What is the meaning of 'simplify(n./d)?
The expression n./d divides each element of n by the corresponding element of d (with a few caveats to that if they're different...

7 years ago | 0

| accepted

Answered
how to get matlab 2019b
The latest release as I type this is release R2019a. Release R2019b is not out yet. If you want to use release R2019a, check wi...

7 years ago | 1

| accepted

Answered
How can I extract values from a histogram (figure)?
If you only have access to the figure file, use openfig to open it in a figure window then use findobj to obtain the handle of t...

7 years ago | 1

Answered
Why doe the data extracted from excel sheet gets converted to scientific power ?
To change the way the data is displayed (which will not impact how it is stored) use the format function.

7 years ago | 0

Answered
How can I force a non-trivial solution for a second order ODE
Your equation is x''=[ 9/4-(12/(5-3exp(2t)))exp(2t)] x(t) with initial conditions x'=x=0. You are a racecar at the starting line...

7 years ago | 0

| accepted

Answered
How can I average datetimes of my array?
Convert your table to a timetable using table2timetable. Once you have your timetable call retime on it.

7 years ago | 0

Answered
row dimension of aeq is inconsistent with length of beq. Help me pls.
You passed the inputs into fmincon in the wrong order. From the documentation page, the syntax you're calling is: x = fmincon(f...

7 years ago | 1

| accepted

Answered
Pan does not work
Run this command: which -all pan From the error message it sounds like you've created a Simulink model named pan that is takin...

7 years ago | 0

| accepted

Answered
how tocreate a new array that select the columns with a specific prefix in the header row
Read your data into a table array using readtable. Since I don't have your spreadsheet, I'll just create a sample table using th...

7 years ago | 2

Answered
Re-hash the intrinsic Matlab plot function to accept a string as a y input?
You could turn your text data into a categorical array then plot with that categorical data as the Y input. colors = categorica...

7 years ago | 1

Answered
I got "The expression to the left of the equals sign is not a valid target for an assignment."
Just eliminate that line from your code. The way you've defined x on the next line will make it complex since i is already defin...

7 years ago | 0

| accepted

Answered
Dynamic size differential equation system
There's no need for a loop here. Work on vectors. function dvhdt = myodefun(t, vh, alpha, optV, beta) % Compute N from the vh ...

7 years ago | 0

Answered
Blackjack Program -- Random Card Deal
Deal 4 cards from the deck at once. Give the dealer the first two and the player the next two. As written, your code can give t...

7 years ago | 0

Answered
symbolic variable multiplication with numerical matrix
When you perform that multiplication, Symbolic Math Toolbox converts your numbers into rational numbers rather than leaving them...

7 years ago | 1

| accepted

Answered
Resetting individual properties to default values: 2018b
The most straighforward way is probably to define a Hidden, Constant property holding the default value. Since it's Hidden it wo...

7 years ago | 1

| accepted

Load more