回答済み
how to export multiple .mat files to csv using the automation script?
Load to a struct: base=sprintf('mat_file%d',1); S=load([base '.mat']); data=[S.([base '_Inputs']) S.([base '_Outputs'])]; ...

5年弱 前 | 0

| 採用済み

回答済み
Split comma seperated values inside a cell in to multiple columns
S=load(websave('split_mat.mat','https://www.mathworks.com/matlabcentral/answers/uploaded_files/709142/split_mat.mat')); split_m...

5年弱 前 | 0

| 採用済み

回答済み
Can u use filtfilt with structfun?
You need to use either a function handle, or create an anonymous function. Your syntax does neither. Try this modification. % H...

5年弱 前 | 1

| 採用済み

回答済み
Handles not getting updated from pushbutton using GUIDE
Your looping function doesn't store the modified handle struct. guidata(hObject, handles); %put this before your return st...

5年弱 前 | 1

| 採用済み

回答済み
Extracting x,y data from a folder of figures
You can set the visibilty to off when loading the figure: fig = openfig(figfile,'invisible'); That should take care of the f...

5年弱 前 | 0

| 採用済み

回答済み
Incrementing file names to run loop commands
Use sprintf to create your variable names, use arrays to store your data. Don't use numbered variables.

5年弱 前 | 0

| 採用済み

回答済み
Error while averaging multiple images
The size function returns a vector of at least two elements numberOfImages = size(files); %replace this by: numberOfImages = ...

5年弱 前 | 1

| 採用済み

回答済み
I want my graph to be continuous
You can also let Matlab do the heavy lifting by creating an anonymous function and using fplot: a=8.4; v=58.8; fun=@(t) 0 + ....

5年弱 前 | 1

| 採用済み

回答済み
How to use property from one class in to define a property in another class?
I don't know what the 'correct' answer would be, but you can also set the value in the constructor: classdef Agent propert...

5年弱 前 | 1

| 採用済み

回答済み
For this loop I want the output to print str='b' anytime A='1'
This behaviour is exactly as documented. if A=='1' does not create a loop. clc clear str=[]; for q=20:21 A=dec2base(q,1...

5年弱 前 | 0

回答済み
how to store values into array/matrix with different number of rows and only one column
It is best to pre-allocate your output array as close to the size you think you need, because extending a matrix hurts performan...

5年弱 前 | 0

| 採用済み

回答済み
cross product is wrong
1/70368744177664 eps This number is so small that you can assume this is a rounding error. The root cause of this rounding er...

5年弱 前 | 2

回答済み
Remove Curly brackets from string/array - what am I working with?
Your data seems to be a cell containing JSON data: data={'[[0, 145, 0], [145, 169, 1], [169, 1693, 3], [1693, 1708, 1], [1708, ...

5年弱 前 | 0

回答済み
Opening nc file and reading sections of data
Your second code paragraph assumes filename is a function, while the first sets it as a variable.

5年弱 前 | 1

| 採用済み

回答済み
How I can create this matrix?
A simple loop with indexing will do the trick. But in this case you can also use the normal matrix multiplication A=[1 3 0;2 3 ...

5年弱 前 | 0

| 採用済み

回答済み
Error: Brace indexing is not supported for variables of this type.
Why are you reading your file like that? And why are you using assignin? There is no reason to be using that here. Since you'r...

5年弱 前 | 0

| 採用済み

回答済み
How to delete the dropdown items permanently using button in app designer
When you delete an element you need to save the mat file again. You should also consider loading to a struct instead of poofi...

5年弱 前 | 0

| 採用済み

回答済み
Error finding Linear Regression with polyfit and \
Removing the NaNs will do the trick. Although I'm not sure this data should have a linear fit. fn=websave('data.mat','https://w...

5年弱 前 | 0

回答済み
textscan - multiple format lines
It looks like the same format to me. Why not read as text, split on the = and use str2double on the last column? To read your f...

5年弱 前 | 0

| 採用済み

回答済み
Create arrays of observations
You should not name your variables dynamically. Why are you not storing them in an array when reading? What is wrong with the co...

5年弱 前 | 0

回答済み
How to count the black pixels in a segmented section of image?
activecontour returns a logical array. That means you can count the black pixels by inverting and using sum (or nnz).

5年弱 前 | 0

回答済み
How to correctly plot a 6x2 grids of subplots
You can also make a montage yourself. The function below is from my unpublished toolbox replacement suite. You still need an i...

5年弱 前 | 1

| 採用済み

回答済み
Could anyone help me how to generate the matrix in the following manner as described below
data=cell(5,1); for n=1:numel(data) data{n}=randi([1 n],n*100,1); end data=cell2mat(data); size(data)

5年弱 前 | 0

回答済み
Which MATLAB version for standardized GUI tool ?
Which release is the best choice will depend on specifics. As an extreme example: sometimes the performance of Matlab 6.5 (R13) ...

5年弱 前 | 0

回答済み
Matlab integral funtion error
The error tells you that you need to make sure f outputs the same size as the input. f=@(x)(x.*exp((x.^2)-1))./sin(x); % ...

5年弱 前 | 1

| 採用済み

回答済み
how to create an array of ones with some zeros delimited by an ellipse?
I'm going to ignore the part where you want to plot a cartesian object with polar coordinates. You can either use ndgrid or mes...

5年弱 前 | 0

回答済み
How to display rise time in edit box MATLAB Gui?
The function you're using doesn't return a single numeric value, but a struct, as the documentation clearly explains. You need t...

5年弱 前 | 0

| 採用済み

回答済み
defining properties in a class
This doc page seems to suggest this is not natively possible. However, you could implement it as method: %(untested code) clas...

5年弱 前 | 0

回答済み
combination from multiple arrays while omitting same item
We have a small problem when we want to generate all combinations: C = nchoosek(v,k) is only practical for situations where len...

5年弱 前 | 0

回答済み
cswwrite not in one column
This issue is an Excel issue, not a Matlab one. You need to use the 'convert data to columns' option in Excel. You might try t...

5年弱 前 | 0

さらに読み込む