回答済み
X, Y label disappeared in app designer after exporting?
Hi, I guess you should check which callback function is associated with your button, maybe this button plots the figure again w...

3年以上 前 | 0

回答済み
Convert for loop Matlab in python
The equivalent of for i = start:step:finish % do something end is for i in range(start, finish+1,step): #do some...

3年以上 前 | 0

回答済み
How to convert a string into a variable name and assign it a cell of data?
You can use the function eval, although it is not recommanded. For example doing something like: eval([strVarName '=' strVarVa...

3年以上 前 | 0

| 採用済み

回答済み
How to convert the simulink model to s-function
As said on the error, you must install the compilers on the given link. Then you will be able to generate your S function.

3年以上 前 | 0

| 採用済み

回答済み
Copy an image (to be selected with a parameter) from one folder to another
filePattern = fullfile(origin_folder, ['name of figure' num2str(k) '.jpg']);

3年以上 前 | 0

| 採用済み

回答済み
How to generate distincted distanced coordinates?
x = [0:50:1000]; y = [0:50:1000]; [xGrid,yGrid] = meshgrid(x,y);

3年以上 前 | 2

| 採用済み

回答済み
How to find the maximum element by length without a loop?
arrayStr = [a,b]; [~,i] = max(strlength(arrayStr)); maxStr = arrayStr(i); Careful, that works only if a and b are strings, it...

3年以上 前 | 1

| 採用済み

回答済み
Plotting time in hours
You have one line per hour so you can use directly the line index as your time series and plot the associated variable according...

3年以上 前 | 0

回答済み
How to find number of input and output ports of an unknown simulink model ?
Hi, You need to use the function get_param with 'Ports' as a parameter, for each subsystem of your model. The first and second...

3年以上 前 | 0

回答済み
How to load data into a function
Hi, If data is a variable, you must include it as a input of your function function [z] = hello(x,y,data) load(data) %Rest o...

3年以上 前 | 0

回答済み
How can I make my function plot lines to make a rectangle?
Hi, Your function just plots one point. You need to plot all the points of your rectangle, and closing it by returning at the f...

3年以上 前 | 1

| 採用済み

回答済み
move txt file from one folder to another
Hi, There is an error in your code, you've added quotes around your variable name. This should work. A = 300; writematrix(A, ...

3年以上 前 | 0

| 採用済み

回答済み
How can I load different simulink model blocks into new simulink model using Matlab scripts ?
Hi, Check add_block: add_block

3年以上 前 | 0

| 採用済み

回答済み
How to create personalized colormap that starts from a specified value
Hi If Z is the map you plot, you can replace all the negative values by 0 like that : Z = [0 1 8; -1 5 10;-6 -3 14] Z_nega...

3年以上 前 | 0

| 採用済み

回答済み
Why a field is replaced by next field when corresponding function is being called within a loop?
Hi, You're using the same [SL_CI,DL_CI] to store both fields, so the last one override the first one. You should have storing...

3年以上 前 | 0

回答済み
Getting just the time in Date-time cell
Hi for i = 1:length(txt(:,1)) if ~isempty() txtSplit = strsplit(txt{i,1},' '); txt{i,2} = txtSplit{2}; end The value ...

3年以上 前 | 0

| 採用済み

回答済み
Repeatedly call a function in App Designer while working with the App
Hi Have a look a these: https://uk.mathworks.com/help/matlab/matlab_prog/use-the-background-to-make-your-apps-more-responsive....

3年以上 前 | 0

回答済み
find Maximum values in intervals of time(each 2000 values)
Hi, I would do something like that for i = 1:(length(u)-1)/2000 maxArray(i) = max(u((i-1)*2000+1:i*2000)); end You'll ...

3年以上 前 | 0

回答済み
Predict power consumption using linear regression
Hi, You can use the function polyfit with x being the time and y being the power consumption, you will have to choose n to fit ...

3年以上 前 | 0

回答済み
How to multiply two cell array
Hi, C = {}; A={1,2,3}; B={'a','b','c'}; for i = 1:length(A) for j = 1:length(B) C{end+1} = {A{i},B{j}}; e...

3年以上 前 | 0

| 採用済み

回答済み
how to debug the non-working of real() function?
Hi, I guess sinr_los1 is your matrix ? Could you share the inputs and the outputs ? Because both solutions should work M = ...

3年以上 前 | 0

質問


fopen always open the file even when it is already open
Hi, fopen is supposed to return -1 when it can't open the file. So I thought when I had the file open already it would return -...

3年以上 前 | 1 件の回答 | 0

1

回答

回答済み
Why two variables loading the same .mat file are not equal ?
I finally used isequaln to get the result I wanted, thank you all.

約4年 前 | 0

質問


Why two variables loading the same .mat file are not equal ?
Hi, I found something weird today and couldn't find an explanation on the forum. When I load the same matlab file twice, and t...

約4年 前 | 3 件の回答 | 0

3

回答