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
1 vote
0 answers
969 views

How to download and install 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 ...
Alessandro's user avatar
1 vote
1 answer
86 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, '...
dynamicdivergent's user avatar
1 vote
2 answers
683 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 ...
abdelkarim lamghari's user avatar
0 votes
0 answers
36 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 ...
Neo's user avatar
  • 163
0 votes
0 answers
183 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
190 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 ...
Protima Rani Paul's user avatar
1 vote
1 answer
179 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.
Rainb's user avatar
  • 243
0 votes
1 answer
295 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 ...
coder_but_not_smart's user avatar
-1 votes
1 answer
173 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."
Mariah Khayat's user avatar
61 votes
12 answers
58k 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 ...
aadil095's user avatar
  • 737
1 vote
1 answer
670 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 ...
nico1234's user avatar
1 vote
0 answers
34 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 ...
Namsaknoi's user avatar
0 votes
1 answer
65 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.^...
Kutsit's user avatar
  • 125
2 votes
1 answer
593 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; %...
Kutsit's user avatar
  • 125
2 votes
1 answer
35 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 ...
Robert Dodier's user avatar
0 votes
1 answer
274 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 ...
LukasFun's user avatar
  • 101
0 votes
1 answer
208 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 ...
Frederic Chopin's user avatar
0 votes
2 answers
548 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 ...
linker's user avatar
  • 101
0 votes
1 answer
79 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 ...
Sergey Teryan's user avatar
0 votes
1 answer
287 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, ...
Shalomi90's user avatar
  • 103
0 votes
0 answers
483 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(...
Shalomi90's user avatar
  • 103
1 vote
0 answers
46 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, ...
Krzysiek's user avatar
0 votes
0 answers
21 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 ...
Shalomi90's user avatar
  • 103
0 votes
1 answer
58 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 ...
Paul's user avatar
  • 133
0 votes
1 answer
36 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 ...
caesar's user avatar
  • 123
1 vote
0 answers
83 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. ...
Mounir's user avatar
  • 11
0 votes
1 answer
104 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. ...
Tyler Shellberg's user avatar
0 votes
1 answer
45 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 ...
Khamosh Mehta's user avatar
0 votes
1 answer
1k 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: ...
Chris's user avatar
  • 1
1 vote
0 answers
248 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 ...
George Robinson's user avatar
1 vote
0 answers
111 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(...
Kathia's user avatar
  • 111
0 votes
1 answer
89 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. ...
Nick Heumann's user avatar
0 votes
1 answer
340 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/...
CL plane guy's user avatar
0 votes
1 answer
33 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 ...
user1049958's user avatar
0 votes
1 answer
309 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 ...
MN1994's user avatar
  • 1
0 votes
2 answers
238 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....
Morpheus's user avatar
0 votes
0 answers
296 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 ...
Philipp Wälchli's user avatar
1 vote
1 answer
1k 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 ...
S HH's user avatar
  • 11
0 votes
0 answers
920 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 ...
stephanmg's user avatar
  • 111
-1 votes
1 answer
612 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' ...
gatorback's user avatar
  • 1,215
0 votes
2 answers
60 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 ...
Mary A. Marion's user avatar
1 vote
0 answers
50 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 ...
jerH's user avatar
  • 111
0 votes
0 answers
64 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 ...
daverichards's user avatar
0 votes
1 answer
39 views

Merge columns based with date column

I have an excel table with several columns(as shown in the attached picture).I want to merge these ROC1,ROC2,ROC3 and ROC5 where the dates match for them.So an ideal row should be Common Date,ROC1,...
Bunty's user avatar
  • 1
1 vote
1 answer
314 views

computing groebner basis in Matlab [closed]

I am completely new in Matlab and want to compute groebner basis of some polynomials. I just wrote the following code in a new window in Matlab but it says gbasis is undefined! syms x1 x2 x3 x4 p = ...
GhD's user avatar
  • 111
0 votes
1 answer
555 views

Cygwin - error loading shared library: arm-elf-gcc.exe from GNUARM

I have installed Embedded Robot Coder, a set of tools for developing embedded ARM applications, e. g. for Lego NXT brick, using MATLAB on Windows. It contains Cygwin, GNUARM utilities and so on. When ...
Morpheus's user avatar
0 votes
0 answers
35 views

How to do a subtraction of each element in a row with the first element of each row using a loop function MATLAB?

This is my matrix: a= 2.88018141156171 4.49406146768661 4.39969572964863 5.77382684781782 0.302326568062510 0.913580405174539 1.38826913246346 2.16529080203233 And this is my ...
user993075's user avatar
1 vote
1 answer
65 views

what does an equality inside a plot function in MATLAB mean?

So I´m just new on MATLAB and this may be a very silly doubt but when generating basic signals for signal processing I have this: t = (-1:0.01:1)'; impulse = t==0; plot(t,impulse) (from: https://...
Paul's user avatar
  • 35
1 vote
0 answers
104 views

Matlab crashes with Python 2.7 virtual environment on Linux [Manjaro]

So I have some code in Matlab that calls functions from Python's scikit-learn module. The problem is when I try to use Python 2.7 in a virtual environment created via Anaconda, it exits out with ...
mahieyin-rahmun's user avatar
0 votes
1 answer
75 views

How to put a geographical map over 2D data in Matlab

have two vectors of sizes 441*1 and 681*1, these go from 70 to -40 and from 45 to -125 respectively. The first is a list of latitudes and the second a list of longitudes. I have also a 681*441 matrix ...
slow_learner's user avatar

1
2 3 4 5 6