Risposto
How to plot based on the shortest vector?
I was just about to comment something along the lines of the answer @Scott MacKenzie posted. The idea is that you find out what ...

circa 5 anni fa | 1

Risposto
How to remove cells in cell matrix that are a certain value?
data(all(cellfun('prodofsize',data)==1),:)=[]; You might need to specify the dimension for the all function (writing of mobile,...

circa 5 anni fa | 0

| accettato

Risposto
issue when creating and saving file to specific folder
You shouldn't use cd outside of debugging. In general using a full path is a much better idea with better performance. The ca...

circa 5 anni fa | 1

Risposto
Why do I get a wrong answer when I use FIND function in this case?
When you subindex a variable before using find, it will return the indices relative to that subindexed variable. This is because...

circa 5 anni fa | 1

| accettato

Risposto
why do ı receive the error "data must be numeric, datetime, duration, or an array convertible to double". How can I fix it?
Extent is still a symbolic by the time you try to plot it. You need to convert it to a double. Since you omitted the definition ...

circa 5 anni fa | 0

| accettato

Risposto
Record every 12 values in a loop
Using a cell as an intermediate step is generally not efficient, but it tend to be easy to work with. With that in mind: you ca...

circa 5 anni fa | 0

Risposto
using parts of matrix with different sub-vectors (Matlab)
Shouldn't something like this work? Hc = H((T*(ess-1))+1:end,((N*2)*(ess-1)+1:N);

circa 5 anni fa | 0

| accettato

Risposto
Create a new array over each iteration
The code below gives you what you want. The only difference is that you need to write my_data{1} instead of my_data1. [~,~,data...

circa 5 anni fa | 1

| accettato

Risposto
if statement with ge and &
You should write this instead: if j >= 2 && cANALY(i+1,j-1) < 0

circa 5 anni fa | 0

Risposto
Using strfind or regexp in cell
Your intuition that you can use a regular expression is correct: data={... 'METAR ESSA 202008010020Z 28003KT CAVOK 10/09 Q...

circa 5 anni fa | 0

| accettato

Risposto
How can i solve function with an dependent variable?
Below I show the structure of a possible solution. The rest is up to you. Feel free to comment if you have a specific question. ...

circa 5 anni fa | 0

| accettato

Risposto
How to name variable with file name?
You shouldn't do that. If you give all the same name, you will get a struct array when you load everything. for file=1:3 m...

circa 5 anni fa | 2

| accettato

Risposto
Problem with fitting an experimental curve
Your function doesn't fit the data well. You should probably consider using an offset term as well. S=load(websave('data.mat','...

circa 5 anni fa | 0

| accettato

Risposto
How to draw ROI on MRI images ?
drawpolygon should do the trick. Then createMask will get you a binary mask which you can use for further analyses.

circa 5 anni fa | 0

Risposto
counting number of times a string appears and graph in histogram
The count function is doing exactly what you ask it to: you provide it with an array, it returns an array with 1 fewer dimension...

circa 5 anni fa | 0

Risposto
Run Python outside of Matlab
In such cases I tend to write .bat files and start them: system(['start "" "' fn '"']); %The first "" is required, because oth...

circa 5 anni fa | 0

| accettato

Risposto
sum of multiples of 3 from 0 to 100
If I was your teacher I would just tell you to use a loop, leaving you to decide what you aren't allowed to do. In this case ...

circa 5 anni fa | 0

Risposto
Oscillation about one point
It might be enough to use mean on the second half of your vector. Sometimes a simple solution will already do the trick. The ...

circa 5 anni fa | 0

Risposto
when we call for boxplot function, is there any setting to avoid that such function that evaluates outliers, so that the red crosses will be considered part of the distributi
Have you read the documentation? I expect setting Whisker to inf should do it. And indeed it does: boxplot([5;randn(100,1)],'W...

circa 5 anni fa | 2

| accettato

Risposto
repeat values within array
You can edit your code using a cell array for the long way round: X=[0.5;0.5;0.6;0.6]; Y=[0.6;0.7;0.6;0.7]; dx=0.05; dy=0.05...

circa 5 anni fa | 0

| accettato

Risposto
How to get the user's installation path in my app designer?
If you want more control over where your persistent files are stored, I would suggest the GetWritableFolder. This will generate...

circa 5 anni fa | 0

Risposto
applying for loop on variables
You know how to do indexing, so why did you make the decision to store data in a variable name? for k=1:3 rho_r{k}(1)=sqrt...

circa 5 anni fa | 0

Risposto
Operator '*' is not supported for operands of type 'struct'.
You are using an output for the load function (which you should), but that means Matlab will load the data to a struct. I'm gues...

circa 5 anni fa | 0

Risposto
sorting an string cell
You can use sortrows directly, or use code like this: [~,order]=sort(population(:,1)); population=population(order);

circa 5 anni fa | 0

| accettato

Risposto
License Manager Error -8. License checkout failed. Encryption code in license file is inconsistent.
The official reason is explained here. The unofficial reason might be that you're attempting to use a cracked version and your ...

circa 5 anni fa | 0

| accettato

Risposto
Invalid expression. When calling a function or indexing a variable
Matlab variable names must start with a letter and may contain only letters, numbers, and underscores. Anything not fitting that...

circa 5 anni fa | 0

| accettato

Risposto
fiting issue at certain value
You can either adjust your fitting function itself, or simply adjust the output: max(1,[ 1 0.98 1.02 1.1 1.3 ])

circa 5 anni fa | 0

| accettato

Risposto
Hello everyone. How to make a matrix with unequal number of rows and columns, and make the number of rows and columns the same by adding zeros. Thank you very much.
This isn't too difficult, as Matlab automatically fills an array with zeros as it is expanded. S=load(websave('dataA.mat','http...

circa 5 anni fa | 0

| accettato

Risposto
Getting Windows to open a file type using a MATLAB application
You should be able to compile your function and use the 'open with' dialog in Windows to assign it to your exe. If you let your...

circa 5 anni fa | 1

Risposto
Control random number generation
Slightly depending on what you mean: yes. The random number generation has a global state, so it doesn't matter if the call i...

circa 5 anni fa | 0

| accettato

Carica altro