Questions tagged [matlab]

Programming questions about MATLAB are off topic and should be asked on Stack Overflow. MATLAB is a high-level language and interactive programming environment developed by MathWorks. It is the foundation for a number of other tools, including Simulink and various toolboxes that extend the core capabilities.

Filter by
Sorted by
Tagged with
0 votes
0 answers
30 views

How to download MATLAB in Ubuntu with no GUI?

I am working inside a docker container, and the only interface I have is the terminal. I used pip install matlab and it does install the version 0.1, but when I write matlab --version, the message is ...
user avatar
0 votes
0 answers
21 views

How to add a label below polar histogram

I would like to add a text below polar histogram text. Originally, I have a regular histogram and I can use xlabel to put a text as follows: histogram_orientation_of_blobs = histogram(orientation, '...
user avatar
0 votes
0 answers
12 views

How do I get intersection points between 2 points and edges of polygons I plotted with polyshape function in MATLAB

enter image description hereI'm doing a project on indoor localization and it requires some outputs but I'm not a MATLAB master. My problem is the following: I have the coordinates of some walls in a ...
user avatar
  • 1
0 votes
0 answers
11 views

Matlab icon blinks after switching monitors

Whenever I switch from one monitor to two monitors, Matlab icons in the tray start blinking orange. This is a problem specific to matlab, other programs don't do this. Is it possible to turn off this ...
user avatar
  • 39
0 votes
0 answers
20 views

How to format Octave plots to be indistinguishable from MatLab

I have a non-commercial license for Matlab that puts the restriction that I cannot present any plots generated by MatLab to commercial clients. Recently, I started using GNU Octave and found that ...
user avatar
  • 125
1 vote
1 answer
93 views

Normal distribution for a given range of numbers in Matlab

My question is about estimating a normal distribution for a row of points of an interval that are extracted from the data, just knowing the maximum (xmax = 200) and minimum (xmin = 100), to distribute ...
user avatar
0 votes
0 answers
11 views

Matlab exits during installation without any prompt or error hint

I was installing matlab 2021b using the online installer. At first, everything went well and it began the installation process. But at some point, when the progress bar is at 15%, 40% or so, it exits ...
user avatar
  • 113
0 votes
0 answers
55 views

Mathmatica saving Matlab files as Mathmatica as Wolfram Mathmatica Package

I have used Matlab for years and had to download Mathmatica for a class. However when I saved a Matlab file I think I accidently gave Mathmatica permission to be the defualt for .m files.I have ...
user avatar
0 votes
0 answers
49 views

Implement Unit Tests for Matlab User-Defined Objects

I am doing some object-oriented programming in MATLAB and was interested in implementing some unit tests for my user-defined object. I looked through the documentation but it appears to be in the ...
user avatar
  • 171
0 votes
0 answers
28 views

Read Outpipe value at runtime in Simulink

I am running a Simulink version of the Tennessee Eastman Process (can be found by searching for the Tennessee Eastman Process archive online) The process has a subsystem called HourlyRate which ...
user avatar
  • 13
0 votes
0 answers
29 views

Exporting a list from Mathematica to Matlab

I have a list of two dimensional data (1024 points in the plane) called data on Mathematica that I export using Export["data".mat"] On MATLAB I load this file on an empty script as ...
user avatar
  • 111
0 votes
0 answers
137 views

Want to have further segment from another pie chart

I hope the picture is self-explanatory. I have already a pie chart I have to have a further segment in the chart but it has to keep the previous parent segment intact. I have tried this in Excel and ...
user avatar
1 vote
1 answer
35 views

How do you use git from matlab online?

I'm using matlab from https://matlab.mathworks.com/ Is there any way to use git from there? the interface doesn't seem very enlightning. Matlab help assumes you have a local matlab installation.
user avatar
  • 173
0 votes
1 answer
123 views

How to use full 256GB RAM of my work station? MATLAB only seems to be using 75GB of RAM and not the 256GB that is available

I have a workstation that has 256GB RAM and 32 cores. However, when I am running some high-end simulations, the maximum used memory by the MATLAB is 33% (75 GB) and it never increases. The simulations ...
user avatar
-1 votes
1 answer
128 views

How can I solve the Error: 358 when activating MATLAB R2019b?

"Error 358: The license file expiration date has passed. In order to activate this license, the license file expiration date must be set to a future date."
user avatar
61 votes
12 answers
48k views

Can I run my CPU at 100% usage for a long time?

I have a Dell XPS 15 9570, 32 GB ram, 2.2 ghz and 6 cores. When i use an application (The parsim command on MATLAB) (for more details) then my fan starts running fast , during this my PC doesn't seem ...
user avatar
  • 737
1 vote
1 answer
571 views

Merge 3 .csv into one file with different number of columns

I have 3 .csv files and I want to merge them together to one .csv file which can be in R or Matlab. The files are: 1597 obs of 167 variables; 160 obs of 167 variables; 533 obs of 146 variables I ...
user avatar
1 vote
0 answers
28 views

Matlab refuses to compute a limit [closed]

I have some function handle which has a variable input x, along with some parameters. I am trying to compute the limit when x goes to zero from above of that function, for different values of the ...
user avatar
0 votes
1 answer
50 views

MatLab showing different plots on different zoom level

I ran this code on MatLab: function main fimplicit (@(x,y)f(x,y),[2 5]) end function fun = f(x,y) nc=1.45; %cladding nf=1.5; ns=1.4; %substrate h=5; %width of waveguide kappa=sqrt(x^2*nf^2-y.^...
user avatar
  • 125
2 votes
1 answer
298 views

How to get different color for different branches in a plot in MatLab, Mathematica and Desmos

I am trying to obtain slab-waveguide dispersion plot like this (dashed line): I tried following code in Matlab: function main fimplicit (@(x,y)f(x,y),[0 10]) end function fun = f(x,y) nc=1.45; %...
user avatar
  • 125
2 votes
1 answer
32 views

Linking JVM languages other than Java with Matlab

I'm aware that it's possible to link Java programs with Matlab. Is it therefore possible to link any JVM languages with Matlab? I would suspect that's the case -- presumably Matlab can't tell and ...
user avatar
0 votes
1 answer
169 views

Values of Components in a Matlab app are not updated while a loop is running

I have created an app using the App Designer in Matlab. I have a check box called CheckBox and want to access its value from inside a loop, e.g. display it in the console. The way this could be done ...
user avatar
  • 101
0 votes
1 answer
95 views

MATLAB: Growing an array and logical indexing

I create the following array in MATLAB: Now I find which elements of x are greater than 4: So far so good. Now I create an array of length 8: And now I execute this command: I am very confused as ...
user avatar
0 votes
0 answers
244 views

Could not access the MATLAB Runtime component cache

I am running a matlb program compiled for windows on debian / linux. I have installed the Matlab runtime for windows on the machine using wine. Currently when i try to run the program using wine by ...
user avatar
0 votes
2 answers
313 views

Matlab solve command gives four equations instead of 2 real solutions

I am trying to solve the following equation:x^4 - 3*x^3 + x^2 - 1 by doing: solve(x^4 - 3*x^3 + x^2 - 1 == 0) I am expecting either two real solutions or four solutions where two of them are real and ...
user avatar
  • 101
0 votes
1 answer
55 views

"gcs" returns nothing in MATLAB

After I restarted my PC and then re-opened a .m script I was working on, that for some reason broke it. gcs for some reason returns 0×0 empty char array when it's supposed to return the pathname of ...
user avatar
0 votes
1 answer
82 views

Matlab syntax (1:end-1) - Explanation

Could someone explain me this code? meas.jerk.time = (meas.acc.time(1:end-1) + meas.acc.time(2:end)) ./ 2; Assuming that meas.acc.data and meas.acc.time are vectors with the same number of elements, ...
user avatar
  • 103
0 votes
0 answers
231 views

MATLAB - Error using interp1>reshapeAndSortXandV X and V must be of the same length

I geht this error message when I try to derive my acceleration of the car. I think there is a size problem, but I don't know how to solve it. The data is measured from a car. meas.jerk.data = diff(...
user avatar
  • 103
1 vote
0 answers
31 views

Opening MATLAB scripts by double click on linux

I associated '.m scripts with Matlab, but still, I have a problem. When I open two files of this type, I open 'two Matlabs' also. I want to have a similar result as in Windows. I open two scripts, ...
user avatar
0 votes
0 answers
16 views

MATLAB output array

I'm a beginner and I got a Script and I have to out put RES{1} and RES{2} RES{ii,1} = measure; RES{ii,2} = measure_filter; measure and measure_filter will be filled before. But I don't know how to ...
user avatar
  • 103
0 votes
1 answer
42 views

MATLAB: recall previous command and ADD it to what I typed (similar to bash)

On the MATLAB commandline, I can recall the previous command with the UP arrow. However, if I already have typed something and then hit UP arrow, only commands beginning with what I already typed will ...
user avatar
  • 133
0 votes
1 answer
21 views

How to make an application "recognized" as an application

I'm using ubuntu and i3 window manager. To launch matlab I have to navigate to /usr/local/MATLAB/R2019a/bin and type ./matlab. Other applications like firefox and atom are recognized as ...
user avatar
  • 123
1 vote
0 answers
57 views

Here HDLM in Matlab, App ID and App code credentials validation

I created a Freeminum account in Here technologies website and generated the App ID and App code. I tried to use those credentials in the HERE HDLM feature in the Automated driving Toolbox in Matlab. ...
user avatar
  • 11
0 votes
1 answer
48 views

Is there any way to tell MATLAB to close/exit all open executables/MEX files?

I am currently working on a project that uses MATLAB and MEX files. I frequently make changes to the MEX source files for testing, and then go to replace these files with my newly-compiled ones. ...
user avatar
0 votes
1 answer
42 views

Assistance with forming normal vectors on the graph

I am doing an assignment question link to image I am trying to find the normal vectors to my 'ice-cream' cone curve, which consists of a part cone and part sphere. I need help with the code because I ...
user avatar
0 votes
1 answer
743 views

Matlab fit function not accepting "numeric" data type

This is driving me crazy, I'm just trying to fit a gaussian curve to some data using Matlab's fit function (r2017a). gaussEqn = 'a*exp(-((x-b)/c)^2)+d' f = fit(x,y,gaussEqn); But I get this error: ...
user avatar
  • 1
1 vote
0 answers
146 views

How to create a 3D plot with orthographic projections – Matlab

How can I generate a 3D plot with the orthographic projections of a parametric curve on the inside walls of the 3D plot, as shown in this youtube video? I can generate a 3D plot of the curve using ...
user avatar
1 vote
0 answers
80 views

Create a 3D space for dots moving in a given direction

I have written a code that animates 2d dots moving in a certain direction. I tried to create a 3rd dimension using spherical coordinates, and for that I used two times the psychtoolbox function Screen(...
user avatar
  • 111
0 votes
1 answer
45 views

Parametric plotting on MATLAB

I am working on a quantitative finance problem, and I wish to plot the following functions: mu= 0.1*w+0.14*(1-w) and sigma = (0.12^2)*w^2+0.4*0.12*0.2*2*w(1-w)+(0.2^2)*(1-w)^2; for w between 0 and 1. ...
user avatar
0 votes
1 answer
199 views

MathWorks is written for Lego firmware V1.03, but Lego is up to V1.10

MathWorks (MATLAB and Simulink) is/are written for Lego firmware 1.03! (with no TelNet ID/passkey) Versions 1.07 and 1.08 also do not require the ID/passkey. Versions 1.09 and 1.10 do require an ID/...
user avatar
0 votes
1 answer
22 views

When I try to install matplotlab library getting the error mentioned in the description

When I try to install matplotlab library in my python 3.7.3, I am getting the below error, Could not find a version that satisfies the requirement matplotlab (from versions: ) No matching ...
user avatar
0 votes
1 answer
307 views

Editing Individual Bar Colors in MATLAB

I am writing a sample code in MATLAB to display profit of a business over a certain amount of time. So far I have plotted the following with relative ease. time = {'4 weeks','12 weeks','24 weeks','27 ...
user avatar
0 votes
2 answers
67 views

Windows: make application installed in Program Files seen like it has no spaces

I have Matlab installed in 'Program Files', and I need to install the toolbox that requires a path without any spaces. The problem is I can't perform reinstallation of that program in another location....
user avatar
0 votes
0 answers
158 views

Matlab/Simulink: How to programmatically edit the Solar Cell component?

I am trying to programmatically add components to a Simulink model. The programmatic model editing logic of MATLAB is very straight-forward (reference), but here I run into an issue. I am struggling ...
user avatar
1 vote
1 answer
613 views

How to revert GCC installation on Centos 7

I recently installed gcc 6.3.0 following the instructions on this site as it is the supported compiler for the 2018b release of Matlab and Simulink. However due to compatibility issues with other ...
user avatar
  • 11
0 votes
0 answers
614 views

Passing arguments to MATLAB script/function

I'm trying to pass arguments to my MATLAB script via this command in a Terminal running Bash: matlab -nodisplay -nosplash -nodesktop -r "K18 1 20 'file.csv'" -logfile log.log The K18.m file looks ...
user avatar
  • 111
-1 votes
1 answer
435 views

filtering MATLAB results with strfind

myver = ver; myver(1:5).Name returns: ans = 'Computer Vision System Toolbox' ans = 'Control System Toolbox' ans = 'Curve Fitting Toolbox' ans = 'DSP System Toolbox' ans = 'Database Toolbox' ...
user avatar
  • 1,085
0 votes
2 answers
39 views

How to output a table with specified header columns in Matlab?

My technique of making a vector out of "column" variables in a table only works part of the time. What is different about K1 from index in the following code? I am debugging a numerical method and I ...
user avatar
1 vote
0 answers
43 views

How can I use MatLab to optimize based on relative rank?

This is a problem that I have previously addressed in Excel, but would like to move to MatLab for better quality solutions. Where I work, there is a semiannual process to rank new initiatives. They ...
user avatar
  • 111
0 votes
0 answers
57 views

Automatically kill a process based on zise and timeout

I am using Matlab which is constantly generating ghost excel processes - our around 40 mb each and whcih refuse to close on their own (after Matlab request) - I wonder if there is a way to ...
user avatar

1
2 3 4 5 6