Risposto
Pseudorandom character matrix generation
If you want a 10x10 char array, you can also use indexing: source = 'bdpq'; Array = source(randi(end,[10 10]))

2 mesi fa | 0

| accettato

Risposto
If not with a xlsx file
You should have used isempty in your current code: if ~isempty(app.filename) For the test you now want to do, you should extra...

2 mesi fa | 0

| accettato

Risposto
Saving file causes glitch
As a temporary workaround you can use this: edit my_script.m % should give you a popup asking if you want to create the file O...

2 mesi fa | 0

Risposto
Fitting data from file
You can specify those parameters, but what is much more effective is providing good initial guesses (and not mixing up x and y):...

2 mesi fa | 1

| accettato

Risposto
get alpha (color) value of a line
I have no clue why this is hidden, but converting the object to a struct and hunting for a few appropriate candidates I found th...

2 mesi fa | 1

| accettato

Risposto
Appending mixed types to strings seems a bit tricky. Is this the intended behaviour?
It helps to do this step by step, which show that (while unintuitive), this is intended behavior. Matlab evaluates code from le...

2 mesi fa | 3

| accettato

Risposto
How to assign matrices to an array in a for loop
You can use a cell array: for i = 1:5 matrices{i} = [i*1 i*2 i*3; i*4 i*5 i*6; i*7 i*8 i*9]; end

2 mesi fa | 1

| accettato

Risposto
APP Designer code convert to CPP code
Do you need to generate the C++ code, or is it also fine to end up a stand-alone executable? As the message indicates, UIFigure...

2 mesi fa | 0

Risposto
Difference between "||" and "&&" in my loop
The or operator means and/or, just like it does in mathematics. You can use the xor function (although no operator or short-circ...

2 mesi fa | 0

Risposto
How to reduce the file size of a saved histogram figure
You have two options that I'm aware of: # Change the underlying data so you reproduce the same bins with fewer data points. ...

2 mesi fa | 1

Risposto
Computational cost of the commanda 'path'
Once you are at the stage where the profiler makes any sense at all, you should question why you are still using scripts instead...

2 mesi fa | 0

| accettato

Risposto
Change exp from number to e
Your own suggestion actually works (although it requires a call to simplify): syms c1 c2 y(x) f(x) e y(x) = (e^2/(e^2+1))*e^(-...

2 mesi fa | 0

| accettato

Risposto
confusion matrix with string greek letters like alpha and beta
If you use the actual greek letters, that should work (as long as the function supports all implemented characters): text(1,1,c...

3 mesi fa | 0

Risposto
reading files that contain changing parts and parts that need to be ignored
You need to use dir to find the actual file name matching some pattern. Then you can provide the function with the real file nam...

3 mesi fa | 0

| accettato

Risposto
negative positive sign matrix B need to follow matrix A
The sign function seems an obvious choice: A=[ -1 3 -2 4 6]; B=[2.1 2.2 4.2 4.5 5.8]; C=sign(A).*B sum(C)

3 mesi fa | 2

| accettato

Risposto
How to generate repeatable random multiple vectors with Specific Number of Values and Fixed Sum?
You should try to restructure your problem to make it fit the tools you already have. If we figure out a way to generate an ord...

3 mesi fa | 0

| accettato

Risposto
Rotate an image around centroid without deformation
I'm not a fan of using i as a variable name, nor do I like shadowing the image primitive with a variable. Other than that, read...

3 mesi fa | 1

| accettato

Risposto
How to format wkt (well known text string) as a normal string to build a webread input?
I suspect you need to apply percent encoding, as URLs are not allowed to contain spaces.

3 mesi fa | 1

Risposto
How to generate random Patient ID numbers?
The save function has two modes: saving variables and saving a struct. The easiest way to solve this error is to store the da...

3 mesi fa | 1

| accettato

Risposto
how to minus a sequence value
The diff function will do what you want. You can use abs to get the absolute value.

3 mesi fa | 0

| accettato

Risposto
Can MATLAB control a website and extract data from it?
My suggestion would be to look at the network tab of your browser's debugging tools to find out from where that data is loaded. ...

3 mesi fa | 0

| accettato

Risposto
How to Convert data into Image using Matlab
The shape did not actually change. You just expanded the y from [-2 18] to [0 1000]. S=load(websave('tmp.mat','https://www.mat...

3 mesi fa | 0

Risposto
How do I access a .m file in a subfolder?
If you want the read the file as text: You can use a relative path: txt=fileread(fullfile('Workspace','constants.m')); You ca...

3 mesi fa | 0

| accettato

Risposto
Hide licensee first name
You can change your username, which is what is actually displayed.

3 mesi fa | 0

| accettato

Risposto
how does "[x,y] = WindowCenter(window)" work
The documentation for that function is terrible. Let that be a lesson for when you write your own function. This help text is co...

3 mesi fa | 0

| accettato

Risposto
Min and Max values and corresponding x/y values
You should use the second output of the min function to return the linear index of the position with the lowest value. Since yo...

3 mesi fa | 0

Risposto
there is an error in describing the loop, please help me to resolve this one.
If you're not planning to do anything with the intermediate values, why would you store them? init % Runs the first part of you...

3 mesi fa | 0

| accettato

Risposto
How to stop (an infinite loop) / the execution of my matlab code via app designer?
You need to use the callback function from your stop button to edit a value. This is the general structure: function StartButto...

3 mesi fa | 0

Risposto
install command on linux doesn't bring up installer - again
The 'solution' is to run the installer as normal user (no sudo) and make the current user the owner of the install directory wit...

3 mesi fa | 0

Risposto
Loop through parents name
If you're using a struct, you need to do this: uitabname = 'Panel_Perfo'; obj.Display.Compare_Options = uicontrol(obj.Display....

3 mesi fa | 0

| accettato

Carica altro