Answered
Confronting dates in a constrain
Perhaps decision_variable * (date(x) > date(y) + duration) leading to date(y) - date(x) + duration multiplied by something. ...

2 years ago | 1

Answered
Matlab shuts down during loop using audiowrite
I suspect that you are running into a limit on open files -- I suspect that audiowrite() is not closing files. You could experi...

2 years ago | 0

Answered
How do I get my MATLAB code to display an error if the user input number is less than four digits and has less than two distinct numbers?
user = input('Please enter a 4 digit number: ') % User inputs a number digits = num2str(user); if numel(digits) < 4 || l...

2 years ago | 0

| accepted

Answered
How do I loop through a matrix and break it up into distinct sections?
mask = ismember(YourData(:,2), [55 56]) .'; %row vector result starts = strfind([0 mask], [0 1]); stops = [starts(2:end)-1, s...

2 years ago | 0

| accepted

Answered
Using continous time in Matlab editor
Pi = sym(pi); syms t phi = Pi * ((31*2/360) - (0.028*sin(2*Pi*t))) % Phase shift (pi.d in rad) & t is time phi ...

2 years ago | 0

| accepted

Answered
Does the Symbolic Toolbox Support 0- and 0+ ?
posZ = sym(0); negZ = sym(-0); negZ2 = -sym(0); 1/posZ 1/negZ 1/negZ2 So, no, there is no negative 0 -- if there were then...

2 years ago | 0

Answered
Memory management - variable size array
At the MATLAB level, nearly everything is a variable-sized array. There are relatively few objects that enforce fixed-array limi...

2 years ago | 0

| accepted

Answered
Unexplicable "Operands to the logical AND .." error from "histogram" command
In R2023a, the first line of histogram.m that is not a comment, is line 134; you are getting the error on line 64. You have som...

2 years ago | 1

| accepted

Answered
Obtaining frame forces from Sap2000
You have to do a lot of explicit type casting. See https://www.researchgate.net/publication/337200068_SAP2000-MATLAB_Integratio...

2 years ago | 0

Answered
getting data from workspace to Simulink
If you insist on using a From Workspace block, then you need to insert a leading 0 into the vector to act as the time coordinate...

2 years ago | 0

| accepted

Answered
can you help me use this command in my matlab r2022a?
power_Microgrid_IslandedOperation_DroopControl

2 years ago | 0

Answered
How can i find the lost workspace data if i did not save as .mat file?
Sorry, the data is gone and cannot be recovered. You might be able to make use of the command history to re-do some of the prev...

2 years ago | 0

| accepted

Answered
Uiwait does not work app designer
if app.VButton.Value == 1 | app.GButton.Value == 1 break end You are not testing the state of the pause button. You ...

2 years ago | 0

Answered
Error when getting function to test testprime
The clear; clc makes your code into a script, and makes the declaration of testprime there into a local function for the scri...

2 years ago | 0

Answered
Ones function printing out
The ones is the output of your function. You are running the function by pressing the green Run button, which executes the funct...

2 years ago | 1

Answered
Hi I have a problem when I preform the convolution original image with kernel of ones as the size of the kernel increases the output is appearing totally white Image.
Image = imread('cameraman.tif'); Image ranges from uint8 0 to uint8 255 Image1 = double(Image); Image...

2 years ago | 0

Answered
Why does this code give me an error?
[bestX, fmin] = fmincon(objectiveFunctionForLocal, gBest, [], [], [], [], lb, ub, @(x) nonlinear_constraint(x), options, initial...

2 years ago | 0

Answered
Matlab figure: The legend replaces the graph completely and there is no graph
C:\Users\Elino\OneDrive\Documents\MATLAB\ENCI711\Copy_of_Publish Version\set.m You need to rename that file, or move it so that...

2 years ago | 1

| accepted

Answered
Matlab mobile doesn't execute startup.m at startup
The model of MATLAB Online is as-if it were continually running. ... Sort of. The reality is that when you leave a MATLAB Onli...

2 years ago | 0

Answered
Getting an indexing error when using functions
uexact = uexact + uelem(x1,x2,k,L); Okay, you are invoking uelem() on a scalar x1 out = integral(@(x) ff(x,x1,x2,k...

2 years ago | 1

| accepted

Answered
Error using imread>get_full_filename (line 566) File "gg(21).jpg" does not exist. Error in imread (line 375) fullname = get_full_filename(filename);
imds = imageDatastore('C:\Users\new\Testing',... 'IncludeSubfolders',true,... 'LabelSource','foldernames'); The d...

2 years ago | 0

| accepted

Answered
Looping through a cell array to differentiate and integrate
There are two major functions diff() When at least one of the parameters to diff() is a symbolic expression, or a symbolic func...

2 years ago | 0

| accepted

Answered
How to partition a matrix by sorting a column?
A= [ 73.90 123.17 1.00; 73.79 121.83 0.00; 70.64 74.46 1.00; 69.74 86.40 0.00] u = unique(A(:,3)); ...

2 years ago | 0

| accepted

Answered
I can't comput the following commands
Remove all of the if statements. And convert the && to & A1=sum(total>=90 & total<=100); fprintf('The number of A+ stu...

2 years ago | 0

Answered
How to perform an operation after reading the image?
readimageFcn=@(x) imagenorm(int16(dicomread(x))); There is some uncertainty here, as imagenorm() is not a defined Mathworks fun...

2 years ago | 0

| accepted

Answered
Will there be a Linux ARM binary?
There is no Linux ARM binary. My personal guess is that Mathworks will go for Windows ARM before going for Linux ARM.

2 years ago | 0

Answered
Append tables with a new variable
T1 = table([1:5].') T2 = table([6:8].', [3;1;4]) vn1 = T1.Properties.VariableNames; vn2 = T2.Properties.VariableNames; new_v...

2 years ago | 0

| accepted

Answered
Which version suits AGX Orin?
You cannot install MATLAB on AGX Orin.

2 years ago | 0

Answered
How to calculate and display electricity used in a month using fprintf?
KWH = input('How many KWH this month: '); BILL = 0.066 * KWH; fprintf('Your charge for %f KWH will be $%.2f\n', KWH, BILL)

2 years ago | 1

Answered
How to compute the following questions
You can use nnz(BooleanArray) or sum(BooleanArray) to get the number of selected results.

2 years ago | 0

Load more