Can a university purchase MATLAB student license as organization.

1 year ago | 0

Extracting a number from cells
How are these strings stored? Are these stored in a cell array? If yes, try something like this C = {'Monday06', 'Monday10', 'M...

1 year ago | 0

How to solve stiff ODEs with MATLAB Coder?
No, unless MathWorks add support, there is no way to generate the C code for these functions. However, you can try this FEX pack...

1 year ago | 1

How to extract the function from curve fitting tool in Matlab
No, in the case of interpolated curve fitting, it is not possible to get a nice and simple equation. It uses several linear equa...

1 year ago | 1

why does realmax('single') display 8 digits?
"most texts agree that IEEE-754 sinlge persision has 7 signicant digits and double percision has 15" But they don't. More preci...

1 year ago | 0

Taking the first bit (i.e. even vs odd)
Why not take the last bit of every fifth byte, to begin with. For example, something like this f = fopen('filename.bin', 'r'); ...

1 year ago | 0

| accepted

suggest a method/algorithm to solve Combinatorial optimization
I don't think there is a function in MATLAB that operate on a list of optimization variables. The closest possible option is to ...

1 year ago | 1

| accepted

Sequential reading of an array using loop
You can use arrayfun(), which is essentially an implicit for-loop lat=[27.692612,27.690227,27.696509] lon=[85.342982,85.342576...

1 year ago | 0

How can I concatenate unknown numbers of row vectors?
You don't need a for-loop. For example t1=linspace(-1,1,2000); q{1}=4*cos(2*pi*t1/4); t2=linspace(1,3,2000); q{2}=3.*t2-5...

1 year ago | 2

append different matrices in a for loop
One option is to create a cell array to save data in each iteration and then combine it in the form of a vector at the end. See ...

1 year ago | 0

| accepted

output of fun is not a matrix the same size as the block in block proc
You can create a cell array for saving data in each iteration and then stack them together at the end xy_cell = cell(1,N); % it...

1 year ago | 0

how to define a gradient vector of a given function?
You can calculate the analytical expression of gradient using the Symbolic Toolbox. For example, syms x [10 1] y = sum(x.^3...

1 year ago | 0

How to Assign a Variable Name to a Point in a Matrix
I guess your professor asked to pre-calculate the indexes. Something like this row = ceil(NRows/2); col = ceil(NCols/2); for ...

1 year ago | 0

| accepted

How to solve this problem?
You can use rescale(): https://www.mathworks.com/help/matlab/ref/rescale.html to get the values in a range you want. For example...

1 year ago | 0

clear one plot in multiple (hold) figure
Another computationally efficient approach is to create a single line object and update its XData and YData properties x = 1:0....

1 year ago | 1

How to display Xtick values without exponential notation
It is not the property of figure handle. You need to use axes handle ax = gca; ax.XAxis.Exponent=0

1 year ago | 0

| accepted

MATLAB NOOB - How to run a downloaded FILE EXCHANGE code - CRC32
You can only call a function if placed in the "Current Folder" or placed somewhere on the MATLAB path. You need to download this...

1 year ago | 0

| accepted

how to stop executing a function if its duration is too long ?
solve() cannot return a partial solution. It either does return a solution or throws an error or warning if it cannot find one. ...

1 year ago | 0

| accepted

How can I keep the coordinates of a graph's nodes unchanged after removing a specific edge?
You can use the XData and YData property of the graphPlot object to fix their position. Check the following example G = digraph...

1 year ago | 2

| accepted

How to select rows in a matrix with a for loop?
Following code is more efficient and outputs what you want density = densityt(1:817, :)

1 year ago | 0

finding and sorting values in array
Is the order of output matrix important? Try this M = [ 30 3 -1.61e+04 31 3 -1.83e+04 32 3 -2.09e+04 ...

1 year ago | 0

For a matrix with an unknown number of rows, how to find the number of rows n and transform it into n matrices.
I guess you are trying to do something like this rows = data1(:,2); cols = data1(:,1); M = zeros(max(rows), max(cols)); id...

1 year ago | 0

Function for roots ....
Try something like this d = 50; y = 2020; out = datestr(datetime(y,1,0)+d, 'dddd') Result >> out out = 'Wednesday'

1 year ago | 0

| accepted

Can't configure predifined char arguments in a function
mustBeText and mustBeTextScalar were both introduced in R2020b; you cannot use them in R2020a. MATLAB does not provide any valid...

1 year ago | 1

| accepted

matlab online works on any computer and simulink functionality
As far as I know, MATLAB online is not tied to a specific PC, so you can use it anywhere, but you can only use it for work permi...

1 year ago | 0

For a matrix with an unknown number of rows, how to find the number of rows n and transform it into n matrices.
You can find the number of rows in a matrix using size() data1; n = size(data,1) or height() [only in R2020b and later] dat...

1 year ago | 0

| accepted

creating a matrix from an image
You can use meshgrid() like this [r,c] = ndgrid(1:size(M,1), 1:size(M,2)); MM = [r(:), c(:), M(:)];

1 year ago | 0

| accepted

How to move elements of vector
Try this M = [6 0 9 4; 0 4 0 6; 7 0 8 6; 4 5 0 9]; [~, cols] = sort(M==0,2); rows = repmat((1:size(M,1)).', 1, size(M,2)); ...

1 year ago | 1

How can i delete certain numbers of an array
You can use logical indexing w = linspace(0 , pi , 260); idx = (w > 0.4*pi) & (w < 0.5*pi); w(idx) = []

1 year ago | 0

How to expand matrix
You can shorten the second vector by removing the extra elements A; % 1x12225 vector B; % 1x12230 vector B_new = B(1:numel(A)...

1 year ago | 0

| accepted