Skip to main content
Filter by
Sorted by
Tagged with
-1 votes
0 answers
22 views

I have been thinking about a new research project that I need to perform, Dynamic Conditional Correlation (with GARCH & Regime Switching) using financial data. I need to know between MATLAB, ...
Roxana's user avatar
  • 1
1 vote
1 answer
55 views

I'm using MATLAB/Simulink 2023b and built a very simple PV model: constant irradiance (1000), a PV array block, and measurement blocks. But when I run the simulation, all outputs show NaN, even though ...
skander's user avatar
  • 41
2 votes
0 answers
48 views

Let's say we have 3 datasets of the same size, that we want to plot on the same histogram: Dataset_1 = [1 1 1 1 1 1 2 2 2 2 3 3]; Dataset_2 = [1 1 1 2 2 2 2 2 2 3 3 3]; Dataset_3 = [1 1 2 2 2 2 3 3 3 ...
BillBokeey's user avatar
  • 3,550
-4 votes
0 answers
81 views

k = 0.05; CA0 = 3; t0 = 0; tF = 100; ts = 0.1; t = t0:ts:tF; N = length(t); CA = zeros(1, N); CB = zeros(1, N); CA(1) = CA0; CB(1) = 0; for i = 2:N r = k * CA(i-1); CA(i) = CA(i-1) - r * ts; ...
Liam Goldsmith's user avatar
Advice
1 vote
5 replies
85 views

This is the code from my current heatmap: N = 36; Lat_extended = [Latency; zeros(N*N - length(Latency), 1)]; Lat_matrix = reshape(Lat_extended, N, N); figure; heatmap(Lat_matrix) And the figure, The ...
ricardovaras_99's user avatar
1 vote
0 answers
53 views

My code doesn't work well when I apply a custom colormap. It does well with the default colormaps; however, when I specify my own it doesn't work. My current code is this: mymap = [ 0.769, 0.992, 1....
Cristian Alberto Juarez Valle's user avatar
1 vote
0 answers
41 views

How can I extract free spaces from a occupancy grid map in the MATLAB. I have the following code which gave the output that there is no free cell on the occupancy grid map. clc; clear; close all; rng(...
Encipher's user avatar
  • 3,488
1 vote
0 answers
32 views

I'm running into an error while attempting to setup a configuration structure for a single subjects EEG data using Fieldtrip. While I think the answer is plain, I am unable to figure out for the life ...
G_V_12's user avatar
  • 11
1 vote
0 answers
41 views

So I made a program in matlab that numerically simulates a DTS system and its almost right but there's one detail that there's "jagged teeth" in the graphic diagram ( circled in blue ) ...
LEO101's user avatar
  • 13
-2 votes
0 answers
31 views

I want to make my poles and zeros markers bigger. In PLOT I had this option in properties, but in rltool I don't have the same option. I've tried to use set(0, 'DefaultLineMarkerSize', 8); but this is ...
BearShark's user avatar
1 vote
0 answers
59 views

We are using Matlab to communicate with a C++ library, and are struggling with memory management. We create a libpointer pointing to an array, and then try to update its value in a loop. I don't think ...
RPM's user avatar
  • 1,809
1 vote
0 answers
21 views

I am implementing a Grey Wolf Optimizer (GWO) for Maximum Power Point Tracking (MPPT) to generate the reference speed in a wind energy conversion system using Simulink. However, when I run the ...
Ayada Amira's user avatar
0 votes
0 answers
39 views

Please help me refine the ray tracing code of the Stretcher Offner in MATLAB. I used the formulas from the article to plot graphs from Figure 3, showing the dependence of the group delay on the ...
Дмитрий Киселев's user avatar
3 votes
0 answers
98 views

I want to plot all the diagonals of a matrix. In the matrix row 1 contains information of time 1, row 2 of time 2 etc etc. Each diagonal presents the evolution of the number of fishes in a cohort that ...
Claris's user avatar
  • 31
-1 votes
1 answer
56 views

I am trying to build a Matlab script to write data to an Excel file, have the excel file execute, and pull out another cell as the output. I asked an AI engine to give me a script and it came up with ...
Matt Pittard's user avatar
4 votes
2 answers
97 views

I am stuck on a problem with my MATLAB code. This should behave as a pathing program for a calculation. However, it seems to not follow the logic I instructed it. The logic is that, at the current ...
William John Otsuro's user avatar
1 vote
0 answers
109 views

How do you change window title of the base workspace of MATLAB desktop GUI for R2025a onwards on Windows 10? Prior to R2025a, mlservices gives an API: desktop = com.mathworks.mlservices....
Argyll's user avatar
  • 10.1k
1 vote
0 answers
92 views

I have a problem in MATLAB. I want to calculate the nonlinear system of equation using Newton Method. This nonlinear system of equation is taken from finite difference method. The system is Ay=F(y) ...
Ongky Denny Wijaya's user avatar
0 votes
0 answers
61 views

I have a bus if signals in MATLAB Simulink and I want to apply a gain to modify the signal values but preserve the naming elements of the bus, but when I apply a gain to the bus the output is just a ...
Alex Band's user avatar
2 votes
2 answers
174 views

How to check whether a name is a locally accessible function and only locally accessible? For example, with function out = top_level_function(name) % ??? function helper2 end end function ...
Argyll's user avatar
  • 10.1k
2 votes
1 answer
200 views

I have the following numeric matrix in MATLAB: A = [3 2 7; 9 1 4; 5 6 8]; I want to sum all elements that are greater than 5 and are also even. I need to do this without using a loop, and store the ...
Nar.hhs's user avatar
  • 68
1 vote
1 answer
126 views

I'm trying to read a matlab .mat file (v7.3) from python. The thing is one of the field in the .mat object is a table (7x6) with named columns, and every time I read the object I only get a 1x6 array ...
gee3107's user avatar
  • 362
0 votes
0 answers
44 views

I am using the dSpace MicroLabBox and am running their Real-Time Interface (RTI1202) on MATLAB 2024b. I am currently attempting to control a motor through RS485. I have the connection working and the ...
Tanner Burton's user avatar
0 votes
1 answer
29 views

im very new to Simulink and wanted to experiment with the 3DOF (Body Axels) block in Simulink. However my height is just constantly increasing even with no force applied. (I tried applying thrust for ...
ByGoalZ's user avatar
4 votes
1 answer
114 views

Consider two MATLAB m files named profile.m and try_parfor.m as follows. % profile.m function profile() olddir = pwd(); cd(tempdir); fprintf('\nCurrent directory: %s\n', pwd()); func ...
Nuno's user avatar
  • 282
0 votes
0 answers
46 views

To show the bottom left of the matrix, I am manually scrolling down to the bottom of the matrix. I seek a command that will scroll down to the bottom left of the matrix. I do not want to crop the ...
gatorback's user avatar
  • 1,587
0 votes
0 answers
72 views

Recently, I developed a MATLAB-based simulation to evaluate my robot pathfinding algorithm. The robots operate on a network of unidirectional tracks, where each robot computes a single path from its ...
CangWangu's user avatar
  • 181
0 votes
1 answer
104 views

The framework is already loaded immediately after restarting Matlab 2025a. Error using dotnetenv .NET is loaded. To change the environment, restart MATLAB then call dotnetenv. Test code directly ...
xnet_dev's user avatar
1 vote
0 answers
18 views

I'm trying to use the MATLAB robotics toolbox, specifically with the inverse kinematics block. I started only giving the block the translation coordinates, and a weight vector of [0 0 0 1 1 1], which ...
Esteban Ricaurte's user avatar
4 votes
1 answer
72 views

I have a figure with a tiledlayout. If I create an sgtitle I am unable to find that same sgtitle within the fh.Children structure. If I do not create a tiledlayout, then the sgtitle shows up in the ...
Matt's user avatar
  • 2,874
3 votes
1 answer
60 views

How do you read multi-line input from clipboard at once? I tried using input but line change appears treated as Enter pressing. >> x=input(char.empty,'s'); 2020 2037 2054 2131 ans = ...
Argyll's user avatar
  • 10.1k
6 votes
1 answer
145 views

I have created the first figure using legend normally. I would like to have more than one dot in the legend, so the colours are easier to recognize there, as in the second figure (which I created ...
Luis Mendo's user avatar
  • 113k
0 votes
0 answers
58 views

I need to run an old program that depends on MATLAB on my Mac with Apple Silicon, but I only have the precompiled binaries, not the .f source files. The program requires libgfortran.3, but modern ...
Gabriela A.'s user avatar
0 votes
0 answers
48 views

I have three function blocks in my simulink model; A, B, C. I am feeding block A with data 'waypoints', which is an 11x2 array. I want block A to create a 'passthrough' for 'waypoints', such that ...
Tom W's user avatar
  • 1
2 votes
1 answer
47 views

Is there a way to fix the position of left-aligned axis titles regardless of the yticklabels? I am programmatically generating a series of axis objects, where the yticklabels are being autogenerated. ...
magnesium's user avatar
  • 639
0 votes
0 answers
81 views

I've been trying to make this code into a function and gather the wave number, but how do I get the frequency and then collect the data bt changing the wave number and then graphing. Below here is the ...
Tommy Wigenton's user avatar
0 votes
0 answers
66 views

I have a matrix A of size n^2 by n^2, and I wanted to know if for a given accuracy (or a number r) there is a way to express A as the sum of Bi kron Ci for i=1...R where Bi, Ci are n by n? i.e. ...
Brice's user avatar
  • 9
0 votes
0 answers
46 views

I am trying to use the test harness to verify the function of my Simulink model. I set the input from Workspace, and write a .m file to build the input structure(I got embedded bus element in my bus ...
tyrela's user avatar
  • 101
0 votes
0 answers
35 views

I’m experimenting with the MathWorks example that inserts a multi-head self-attention layer into a simple CNN for the DigitDataset: Link to example layers = [ imageInputLayer([28 28 1]) ...
Hend mahmoud's user avatar
6 votes
4 answers
271 views

A measurement system (in our lab) produces data of 12 bits per sample in a packed format, i.e. 2 samples of 12 bits each are packed into 3 bytes: buf[l + 2] | buf[l + 1] | buf[l + 0] 7 6 5 ...
datenwolf's user avatar
  • 163k
0 votes
0 answers
104 views

I manage to correctly simulate a closed loop with Simulink using pure python "control" library. However, I'm now trying to do the same with a new closed loop that has uses a PID controller: ...
João Schmidt's user avatar
0 votes
0 answers
83 views

How do you include two named functions, which are not nested, in one anonymous function? For example, say I have a file mainFunction.m which contains function varargout = mainFunction(in1) % in1 is ...
Argyll's user avatar
  • 10.1k
1 vote
0 answers
37 views

I'm using a MATLAB DAQ for triggering and an Alazar digitizer (ATS-9352) for data acquisition. The DAQ stops its background operation when I call AlazarWaitAsyncBufferComplete(), but I need both to ...
Hyojeong Shon's user avatar
3 votes
1 answer
82 views

If I have a class like this: classdef Person properties Name Age Weight end methods function obj = Person(name, age, weight) obj.Name = name; obj.Age = age; obj....
Angus Comber's user avatar
  • 9,864
3 votes
1 answer
68 views

Hey I'm teaching a calculus course, and for an example in my lecture on surface integrals I would like to generate a surface plot in MATLAB of a portion of a circular cylinder. Here is my MATLAB code ...
ಠ_ಠ's user avatar
  • 133
5 votes
5 answers
160 views

I have a long expression of the (simplified) form x = 1 + 2 + 3 + 4 + 5 that I would like to "play around with" by quickly excluding or including specific numbers from the sum. My idea was ...
MaxD's user avatar
  • 157
5 votes
1 answer
133 views

I'm trying to use std::format in a mex file but get an unresolved external symbol error when I use std as a module. // test_mex.cpp #include "mex.h" import std; void mexFunction(int nlhs, ...
dogAwakeCat's user avatar
1 vote
1 answer
133 views

I'm using MATLAB R2023b with the DDS Blockset and Fast DDS as the middleware. I’m trying to publish a boolean signal (headlightOn) from one Simulink model and receive it in another. Everything builds ...
Can Ömercikoğlu's user avatar
1 vote
1 answer
107 views

I have Simulink model with continuous states with variable-step solver. Is there way to force the solver to execute at a specific nonuniform time steps, let say t0, t1, t2, ..., tn? To clarify, I am ...
Naraghazi's user avatar
  • 121
3 votes
1 answer
59 views

If I have a cell array like this: >> mycellarray = [{'Country' 'State' '1/22/01' '1/23/01' '1/24/01'};{'Afghanistan' '' [0 0] [0 1] [0 2]}] mycellarray = 2×5 cell array {'Country' } {'...
Angus Comber's user avatar
  • 9,864

1
2 3 4 5
1894