답변 있음
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,...

거의 5년 전 | 0

| 수락됨

답변 있음
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...

거의 5년 전 | 1

답변 있음
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...

거의 5년 전 | 1

| 수락됨

답변 있음
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 ...

거의 5년 전 | 0

| 수락됨

답변 있음
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...

거의 5년 전 | 0

답변 있음
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);

거의 5년 전 | 0

| 수락됨

답변 있음
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...

거의 5년 전 | 1

| 수락됨

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

거의 5년 전 | 0

답변 있음
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...

거의 5년 전 | 0

| 수락됨

답변 있음
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. ...

거의 5년 전 | 0

| 수락됨

답변 있음
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...

거의 5년 전 | 2

| 수락됨

답변 있음
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','...

거의 5년 전 | 0

| 수락됨

답변 있음
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.

거의 5년 전 | 0

답변 있음
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...

거의 5년 전 | 0

답변 있음
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...

거의 5년 전 | 0

| 수락됨

답변 있음
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 ...

거의 5년 전 | 0

답변 있음
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 ...

거의 5년 전 | 0

답변 있음
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...

거의 5년 전 | 2

| 수락됨

답변 있음
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...

거의 5년 전 | 0

| 수락됨

답변 있음
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...

거의 5년 전 | 0

답변 있음
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...

거의 5년 전 | 0

답변 있음
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...

거의 5년 전 | 0

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

거의 5년 전 | 0

| 수락됨

답변 있음
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 ...

거의 5년 전 | 0

| 수락됨

답변 있음
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...

거의 5년 전 | 0

| 수락됨

답변 있음
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 ])

거의 5년 전 | 0

| 수락됨

답변 있음
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...

거의 5년 전 | 0

| 수락됨

답변 있음
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...

거의 5년 전 | 1

답변 있음
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...

거의 5년 전 | 0

| 수락됨

답변 있음
Error using bar when plotting from variables
bar([x, y1, w1, 'FaceColor',[0.2 0.2 0.5]]) % ^ ^ Those brackets are incorrect.

거의 5년 전 | 0

더 보기