renelabounek / corrplotg

This is modification of MATLAB function "corrplot" enabling visualize different groups of data samples in the correlation matrix graph.
GNU General Public License v3.0
3 stars 1 forks source link

error running example_script.m #1

Open milenapon opened 4 years ago

milenapon commented 4 years ago

Dear renelabounek,

I was interested using your function 'corrplotg' however I've having issues running your example code. I am using Matlab version R2015a.

First of all, line 8:

load("example_data.mat")

it creates an error as double quotation " " is not valid. Error: The input character is not valid in MATLAB statements or expressions.

Problem easily solved by replacing " per ':

load('example_data.mat')

However, running the code, I get the following errors: Undefined function or variable 'convertStringsToChars'.

Error in gplotmatrixg (line 71)

[varargin{:}] = convertStringsToChars(varargin{:});

Error in corrplotg (line 191)

[H,Ax,bigAx] = gplotmatrixg(X,[],grp,clr,sym,10,[],'hist',varNames,varNames);

I am wondering what is causing the errors, but have no idea nor how to possibly solve them.

renelabounek commented 4 years ago

Dear @milenapon, you are right about the first issue that using ' ' instead of " " is more appropriate in the matlab syntax. I am supprised I have miseed it. I have updated the master version and fixed this bug.

The second issue is that you miss the function convertStringsToChars, which was introduced in the MATLAB R2017b version, as written at the bottom of the function's mathowrs website: https://www.mathworks.com/help/matlab/ref/convertstringstochars.html

Do you have available newer version of matlab instalation? If yes, I would recommend to try to execute it in matlab version R2017b or newer.

If not, try to download this function directly from mathowks, put it into same folder as other corrplotg *.m files and try to execute it with the downloaded function. But trully, I am not fully sure, if mathoworks enables to download some specific internal matlab functions via valid mathworks account. That you would need to double-check.

I hope it helped. Best, Rene

milenapon commented 4 years ago

Dear @renelabounek,

Thanks for your quick reply!! Yeah, so I guess it is a matter of Matlab version. I think there is not much we can do, though. Unfortunately, I am not able do get a newer Matlab version, and you are right Mathworks do not allow us to download specific function that were released at newer versions (otherwise there would be no need for upgrade the software, right?!)

I will try to get a quick look if I can find user-made function that does a similar job as convertStringsToChars. I was able to run gplotmatrix that getting to plot the correlation matrix separating the dataset into groups that are plotted in different markers and colors, which is already helpful for the analysis I am doing.

Thank you for your attention, Milena

renelabounek commented 2 years ago

Dear @milenapon very sorry I missed to reply further. Have you solved the version issue? Or have you written your own function similar to convertStringsToChars? Best regards, Rene